Skip to content

Commit

Permalink
Merge pull request numpy#13856 from mattip/move-header
Browse files Browse the repository at this point in the history
MAINT: move location of bitgen.h
  • Loading branch information
rgommers authored Jun 28, 2019
2 parents 4178b5a + 14c3339 commit 1461f1d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <stdbool.h>
#include <stdint.h>

/* Must match the declaration in numpy/random/common.pxd */

typedef struct bitgen {
void *state;
uint64_t (*next_uint64)(void *st);
Expand Down
2 changes: 1 addition & 1 deletion numpy/core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def generate_api(ext, build_dir):
config.add_include_dirs(join(local_dir, "src"))
config.add_include_dirs(join(local_dir))

config.add_data_files('include/numpy/*.h')
config.add_data_dir('include/numpy')
config.add_include_dirs(join('src', 'npymath'))
config.add_include_dirs(join('src', 'multiarray'))
config.add_include_dirs(join('src', 'umath'))
Expand Down
2 changes: 1 addition & 1 deletion numpy/random/common.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from libc.stdint cimport (uint8_t, uint16_t, uint32_t, uint64_t,
uintptr_t)
from libc.math cimport sqrt

cdef extern from "src/bitgen.h":
cdef extern from "numpy/random/bitgen.h":
struct bitgen:
void *state
uint64_t (*next_uint64)(void *st) nogil
Expand Down
1 change: 0 additions & 1 deletion numpy/random/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def generate_libraries(ext, build_dir):
config.add_data_dir('tests')
config.add_data_files('common.pxd')
config.add_data_files('bit_generator.pxd')
config.add_data_files('src/bitgen.h')

EXTRA_LINK_ARGS = []
# Math lib
Expand Down
2 changes: 1 addition & 1 deletion numpy/random/src/distributions/distributions.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "Python.h"
#include "numpy/npy_common.h"
#include "numpy/npy_math.h"
#include "src/bitgen.h"
#include "numpy/random/bitgen.h"

/*
* RAND_INT_TYPE is used to share integer generators with RandomState which
Expand Down

0 comments on commit 1461f1d

Please sign in to comment.