8000 MAINT: don't install partial numpy.random C/Cython API. by rgommers · Pull Request #14562 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: don't install partial numpy.random C/Cython API. #14562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

rgommers
Copy link
Member

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

For https://numpy.org/devdocs/reference/random/extending.html#cython, we can either leave that in master and only remove it in 1.17.x, or remove it in master until we're ready to add the functionality - what is preferred?

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
@mattip
Copy link
Member
mattip commented Sep 22, 2019

IMO we should remove the documentation from 1.17, but redesign it in master. I still don't have a good feel for what the correct C-API looks like or how we advise people consume it: whether it is the c file headers in numpy/random/src, some combination of cython pxd files that export mixed cpython C-API and pure C, or something else.

@rgommers
Copy link
Member Author

IMO we should remove the documentation from 1.17, but redesign it in master.

Sounds good. I'll do that in the backport PR and will open a separate issue to make sure we don't forget about those docs for 1.18.0

I still don't have a good feel for what the correct C-API looks like or how we advise people consume it: whether it is the c file headers in numpy/random/src, some combination of cython pxd files that export mixed cpython C-API and pure C, or something else.

Me neither. I just checked what Numba does for scipy.special, which just ships pxd files:
https://github.com/numba/numba-scipy/blob/master/numba_scipy/special/signatures.py
https://github.com/numba/numba/blob/master/numba/_helperlib.c#L599
It doesn't look too pretty. Having a pxd file for a Cython API and more standard-looking headers for a C API seems better.

@seberg seberg requested a review from mattip September 25, 2019 18:05
@mattip
Copy link
Member
mattip commented Sep 25, 2019

Still need to remove cython files on line 17 of the MANIFEST.in file.

@rgommers
Copy link
Member Author

Still need to remove cython files on line 17 of the MANIFEST.in file.

I don't think so. MANIFEST.in controls what gets included in the sdist, and these files (also the pxd ones) need including because they're used to build the extensions - see use in numpy/random/setup.py. The add_data_files controls what gets installed, and I think not installing pxd files is all that's needed here.

@mattip mattip merged commit 23c7769 into numpy:master Sep 25, 2019
@mattip
Copy link
Member
mattip commented Sep 25, 2019

Thanks @rgommers. Hopefully we can redo this in a cleaner way soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0