Compiling with Pyrex
![](https://secure.gravatar.com/avatar/398469c9f50b937659217531b8839170.jpg?s=120&d=mm&r=g)
When I use the next command in my home system: $ python setup.py develop Pyrex compiles the '.pyx' file without any problem. But after of uploading it to Pypi, and when is installed via 'easy_install' it doesn't builds any more. (I had to upload the '.c' file compiled on my system) You can see here how has been configured: http://www.bitbucket.org/ares/bcryptwrap/src/tip/setup.py and here where I had to add any files: http://www.bitbucket.org/ares/bcryptwrap/src/tip/MANIFEST.in Note that in the last verion in Pypi I've only one of the next sentences but I had both ones in anterior revisions. setup_requires='Pyrex', install_requires='Pyrex', It download and install Pyrex before of my package, but Pyrex doesn't compile the file.
![](https://secure.gravatar.com/avatar/5e5142d6a1a578f02e2d94c4d6d31088.jpg?s=120&d=mm&r=g)
Hello develop works with your environment, so it might not behave like install would. To make your package installable, I believe you have to hook a build_ext step in your setup.py, so Cython (Pyrex) can use your pyx file; I don't know how this can be done with older versions, but Cython provides a "build_pyx'" command that is used for example in lxml see http://codespeak.net/svn/lxml/trunk/setupinfo.py Good luck On Mon, Dec 22, 2008 at 10:33 AM, <devel@jonasmelian.com> wrote:
When I use the next command in my home system:
$ python setup.py develop
Pyrex compiles the '.pyx' file without any problem. But after of uploading it to Pypi, and when is installed via 'easy_install' it doesn't builds any more. (I had to upload the '.c' file compiled on my system)
You can see here how has been configured: http://www.bitbucket.org/ares/bcryptwrap/src/tip/setup.py
and here where I had to add any files: http://www.bitbucket.org/ares/bcryptwrap/src/tip/MANIFEST.in
Note that in the last verion in Pypi I've only one of the next sentences but I had both ones in anterior revisions.
setup_requires='Pyrex', install_requires='Pyrex',
It download and install Pyrex before of my package, but Pyrex doesn't compile the file. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Tarek Ziadé | Association AfPy | www.afpy.org Blog FR | http://programmation-python.org Blog EN | http://tarekziade.wordpress.com/
![](https://secure.gravatar.com/avatar/eaa875d37f5e9ca7d663f1372efa1317.jpg?s=120&d=mm&r=g)
At 09:33 AM 12/22/2008 +0000, devel@jonasmelian.com wrote:
When I use the next command in my home system:
$ python setup.py develop
Pyrex compiles the '.pyx' file without any problem. But after of uploading it to Pypi, and when is installed via 'easy_install' it doesn't builds any more. (I had to upload the '.c' file compiled on my system)
You can see here how has been configured: http://www.bitbucket.org/ares/bcryptwrap/src/tip/setup.py
and here where I had to add any files: http://www.bitbucket.org/ares/bcryptwrap/src/tip/MANIFEST.in
Note that in the last verion in Pypi I've only one of the next sentences but I had both ones in anterior revisions.
setup_requires='Pyrex', install_requires='Pyrex',
It download and install Pyrex before of my package, but Pyrex doesn't compile the file.
The setup_requires is the only one required; however, setuptools is checking for Pyrex's presence *before* it's available on sys.path. I don't know of any way to work around this, except to include pre-built .c files in your distribution.
participants (3)
-
devel@jonasmelian.com
-
Phillip J. Eby
-
Tarek Ziadé