Neal Becker wrote: > python setup.py install -O1 --skip-build --root > ~/RPM/BUILDROOT/Cython-0.11-1rc.fc1\ > 0.x86_64/ > Compiling module Cython.Plex.Scanners ... > Compiling module Cython.Compiler.Scanning ... > Compiling module Cython.Compiler.Parsing ... > Compiling module Cython.Compiler.Visitor ... > Compiling module Cython.Runtime.refpython setup.py build
This looks weird, are you sure you copied this correctly? > Compiling module Cython.Plex.Scanners ... > Compiling module Cython.Compiler.Scanning ... > Compiling module Cython.Compiler.Parsing ... > Compiling module Cython.Compiler.Visitor ... > Compiling module Cython.Runtime.refnanny ... > ERROR: [Errno 2] No such file or directory: > u'/home/nbecker/RPM/BUILD/Cython-0.11.rc/Cython/Runtime/refnanny.pyx' > Extension module compilation failed, using plain Python implementation > running build > running build_py > running build_scripts > > python setup.py install -O1 --skip-build --root > ~/RPM/BUILDROOT/Cython-0.11-1rc.fc10.x86_64/ > Compiling module Cython.Plex.Scanners ... And this seems to be where things continue: > nanny ... > ERROR: [Errno 2] No such file or directory: > u'/home/nbecker/RPM/BUILD/Cython-0.11.rc/Cython/Runtime/refnanny.pyx' > Extension module compilation failed, using plain Python implementation > running install > [...] I actually think that it's the "install" that hits us here. The refnanny.pyx isn't copied on installation, as we expect the .so file to be built already. However, you call "install" with the "--skip-build" option, which prevents the build of the shared library, thus preventing the refnanny from being available at all. We might just declare the refnanny.pyx file as package data, so that it's copied into the installation. It doesn't hurt to have it lying next to the refnanny.so file. Here's another patch. BTW, you can pass the "--no-cython-compile" option to your "setup.py install" call to keep it from compiling certain source files multiple times. It's well enough if it does that once on "setup.py build". Stefan
# HG changeset patch # User Stefan Behnel <sco...@users.berlios.de> # Date 1236676886 -3600 # Node ID 481e8dd15c9cbdcb8902326fdbb8939516cabb71 # Parent 541ca3412d511be84729a573cb38715a08044973 fix inclusion of package data files diff -r 541ca3412d51 -r 481e8dd15c9c setup.py --- a/setup.py Mon Mar 09 19:47:11 2009 -0700 +++ b/setup.py Tue Mar 10 10:21:26 2009 +0100 @@ -11,14 +11,23 @@ setup_args = {} if sys.version_info < (2,4): + import glob cython_dir = os.path.join(get_python_lib(prefix=''), 'Cython') compiler_dir = os.path.join(cython_dir, 'Compiler') setup_args['data_files'] = [ (compiler_dir, ['Cython/Compiler/Lexicon.pickle']), - (cython_dir, ['Cython/Includes/*.pxd'])] + (cython_dir, [ f for pattern in + ['Cython/Includes/*.pxd', + 'Cython/Plex/*.pxd', + 'Cython/Compiler/*.pxd', + 'Cython/Runtime/*.pyx'] + for f in glob.glob(pattern) ])] else: setup_args['package_data'] = {'Cython.Compiler' : ['Lexicon.pickle'], - 'Cython' : ['Includes/*.pxd']} + 'Cython' : ['Includes/*.pxd', + 'Plex/*.pxd', + 'Compiler/*.pxd', + 'Runtime/*.pyx']} if os.name == "posix": scripts = ["bin/cython"]
_______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev