-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
DOC: Inaccurate caveat regarding ctypes #7035
Comments
Is there a published package that uses this technique? |
I don't know, I've been using it for a time without problems. There is nothing really special in extension modules besides file naming, initialization and linking against libpython, AFAIK. Most of the built_ext machinery still applies. |
Besides I don't think there are many published packages using ctypes for custom modules, using this technique or not. Most use cython, swig or extension modules. |
The document could use an overhaul,
|
I'd prefer not to do this part. That belongs in the docs of those packages or a general tutorial, not the numpy docs - just more maintenance for us. |
I am working to solve this issue. I have one question. Currently setuptools is mainly used and distutils is legacy. Should the Cython part be updated to setuptools version? |
I am not sure that document belongs in NumPy anymore. It is not really NumPy-specific, and many other tools exist that are not mentioned there: PyO3, nanobind, CFFI. CTypes is largely recognized to be slow and not maintained. Maybe we should just put a note at the top "This was written in 2008 as part of the original Guide to NumPy book by Travis E. Oliphant and may be out of date" |
That's right. I will create a PR to add the note. |
The "Using python as glue document" states that
But, in fact, build_ext could be used out of the box in most platforms and it's trivial to make it work in Windows. See my answer here. I think something like this recipe could be added to the document in place of the inaccurate and demotivating "big disadvantage" warning.
The text was updated successfully, but these errors were encountered: