diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2019-09-21 05:41:44 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@gmail.com> | 2019-09-21 05:41:44 +0200 |
commit | 09ee875ec9dbb364c4d867c375cce0acd9fab283 (patch) | |
tree | e6369bd82382cdf73b3ce2a4bcddf97f72d0e9c9 | |
parent | 4ff3af387f93ff37f04f42458d4590c33f61fb9e (diff) | |
download | numpy-09ee875ec9dbb364c4d867c375cce0acd9fab283.tar.gz |
MAINT: don't install partial numpy.random C/Cython API.
See https://mail.python.org/pipermail/numpy-discussion/2019-September/080088.html
for discussion. We need to do this right, and add tests and docs.
All this PR does is not install bitgen.h, common.pxd and bit_generator.pxd
(they're still shipped in the sdist, that is needed).
Should be backported to 1.17.x
-rw-r--r-- | numpy/random/common.pxd | 2 | ||||
-rw-r--r-- | numpy/random/setup.py | 2 | ||||
-rw-r--r-- | numpy/random/src/bitgen.h (renamed from numpy/core/include/numpy/random/bitgen.h) | 0 | ||||
-rw-r--r-- | numpy/random/src/distributions/distributions.h | 2 |
4 files changed, 2 insertions, 4 deletions
diff --git a/numpy/random/common.pxd b/numpy/random/common.pxd index 2f7baa06e..ac0a94bb0 100644 --- a/numpy/random/common.pxd +++ b/numpy/random/common.pxd @@ -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 "numpy/random/bitgen.h": +cdef extern from "src/bitgen.h": struct bitgen: void *state uint64_t (*next_uint64)(void *st) nogil diff --git a/numpy/random/setup.py b/numpy/random/setup.py index f0ebe331f..ce7f0565f 100644 --- a/numpy/random/setup.py +++ b/numpy/random/setup.py @@ -34,8 +34,6 @@ def configuration(parent_package='', top_path=None): defs.append(('NPY_NO_DEPRECATED_API', 0)) config.add_data_dir('tests') - config.add_data_files('common.pxd') - config.add_data_files('bit_generator.pxd') EXTRA_LINK_ARGS = [] # Math lib diff --git a/numpy/core/include/numpy/random/bitgen.h b/numpy/random/src/bitgen.h index 0adaaf2ee..0adaaf2ee 100644 --- a/numpy/core/include/numpy/random/bitgen.h +++ b/numpy/random/src/bitgen.h diff --git a/numpy/random/src/distributions/distributions.h b/numpy/random/src/distributions/distributions.h index f2c370c07..b778968d7 100644 --- a/numpy/random/src/distributions/distributions.h +++ b/numpy/random/src/distributions/distributions.h @@ -9,7 +9,7 @@ #include "Python.h" #include "numpy/npy_common.h" #include "numpy/npy_math.h" -#include "numpy/random/bitgen.h" +#include "src/bitgen.h" /* * RAND_INT_TYPE is used to share integer generators with RandomState which |