Skip to content

Including <arrayobject.h> path for C extension compilation #1126

Answered by mayeut
jmorgadov asked this question in Q&A
Discussion options

You must be logged in to vote

Without seeing the actual config (do you have a link?) it's hard to answer.
Usually, as you noted, numpy shall be specified in build-system.requires and in fact, you probably want oldest-supported-numpy in there rather than numpy.
The rest will depend on your actual build system.
With setuptools, you'd use np.get_include() something like Extension('foo', ['foo.c'], include_dirs=[np.get_include()])

EDIT:
I'm guessing it's for https://github.com/jmorgadov/fdce
If I'm guessing right, I think that adding oldest-supported-numpy to build-system.requires and changing setup.py as follow will do (you don't need environment or before-build settings here):

 from setuptools import Extension, setup, f…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jmorgadov
Comment options

Answer selected by jmorgadov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants