8000 MAINT: move location of bitgen.h · rkern/numpy@14c3339 · GitHub
[go: up one dir, main page]

Skip to content

Commit 14c3339

Browse files
committed
MAINT: move location of bitgen.h
1 parent 4178b5a commit 14c3339

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

numpy/random/src/bitgen.h renamed to numpy/core/include/numpy/random/bitgen.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <stdbool.h>
77
#include <stdint.h>
88

9+
/* Must match the declaration in numpy/random/common.pxd */
10+
911
typedef struct bitgen {
1012
void *state;
1113
uint64_t (*next_uint64)(void *st);

numpy/core/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def generate_api(ext, build_dir):
610610
config.add_include_dirs(join(local_dir, "src"))
611611
config.add_include_dirs(join(local_dir))
612612

613-
config.add_data_files('include/numpy/*.h')
613+
config.add_data_dir('include/numpy')
614614
config.add_include_dirs(join('src', 'npymath'))
615615
config.add_include_dirs(join('src', 'multiarray'))
616616
config.add_include_dirs(join('src', 'umath'))

numpy/random/common.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from libc.stdint cimport (uint8_t, uint16_t, uint32_t, uint64_t,
55
uintptr_t)
66
from libc.math cimport sqrt
77

8-
cdef extern from "src/bitgen.h":
8+
cdef extern from "numpy/random/bitgen.h":
99
struct bitgen:
1010
void *state
1111
uint64_t (*next_uint64)(void *st) nogil

numpy/random/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def generate_libraries(ext, build_dir):
3636
config.add_data_dir('tests')
3737
config.add_data_files('common.pxd')
3838
config.add_data_files('bit_generator.pxd')
39-
config.add_data_files('src/bitgen.h')
4039

4140
EXTRA_LINK_ARGS = []
4241
# Math lib

numpy/random/src/distributions/distributions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "Python.h"
1010
#include "numpy/npy_common.h"
1111
#include "numpy/npy_math.h"
12-
#include "src/bitgen.h"
12+
#include "numpy/random/bitgen.h"
1313

1414
/*
1515
* RAND_INT_TYPE is used to share integer generators with RandomState which

0 commit comments

Comments
 (0)
0