27 Apr 2012 15:03
Re: Building distutils setup.py to find PXD files for Pure Python file
Ian Bell <ian.h.bell <at> gmail.com>
2012-04-27 13:03:21 GMT
2012-04-27 13:03:21 GMT
Stefan,
In any case, the new and preferred way is described here:
http://wiki.cython.org/enhancements/distutils_preprocessing
And, yes, it would be good to visibly present this in the documentation.
The build documentation is mostly ok but lacks this feature:
http://docs.cython.org/src/userguide/source_files_and_compilation.html
The build docs are in good shape - lots of useful information, but from browsing the mailing lists, seems like quite a few people are having varied issues with PXD files and distutils. Would be great to have a (nominally) working example in the documentation online and/or a downloadable version. Also, an example of getting Cython distutils parameters would be great.
Just for fun, tried a new setup.py file, like the link you recommended using cythonize. Works a charm. Weird. I think I am in business for now. Thanks for your help and patience.
So it seems that cythonize does something slightly different than the Cython build_ext command. I suppose this shouldn't be the expected behavior?
Cheers,
Ian
##### setup2.py #######
from distutils.core import setup
from Cython.Build import cythonize
setup(
name = 'MyProject',
ext_modules = cythonize(["integrate_py.py"]),
)
Just for fun, tried a new setup.py file, like the link you recommended using cythonize. Works a charm. Weird. I think I am in business for now. Thanks for your help and patience.
So it seems that cythonize does something slightly different than the Cython build_ext command. I suppose this shouldn't be the expected behavior?
Cheers,
Ian
##### setup2.py #######
from distutils.core import setup
from Cython.Build import cythonize
setup(
name = 'MyProject',
ext_modules = cythonize(["integrate_py.py"]),
)
RSS Feed