Stefan Behnel <[EMAIL PROTECTED]> wrote:
>
> Ondrej Certik wrote:
>> Ok, the package builds now, but it doesn't include the .so file. I
>> don't have time at the moment to investigate, sorry. I can upload the
>> package as pure python if you want.
>
> Pure Python is better than no Cython. :)
>
> As I said, it's only an optional optimisation. (although I'd really like to
> know why this causes problems).
Hi, I think I can shed some light on the problem.
The observed behaviour (building Scanners.so, but not installing it) can
be reproduced with the following two commands:
python setup.py build
python setup.py install --no-compile --root /tmp
build uses build/lib.linux-x86_64-2.5/ as target directory,
install does a new build into build/lib/ and installs the contents of
this.
The cause of the problem is that setup.py adds the Scanners.so extension
to the setup() arguments only if the '--no-compile' flag is not given.
--no-compile is an option for install, not for build.
Which means, when using the mentioned command sequence (which gentoo
does, and I guess debian too), the extension gets created anyways. It
just doesn't get installed.
Thinking about it, this part
try:
sys.argv.remove("--no-compile")
except ValueError:
#try to build the extension
is an error, because it causes the .py files to be compiled. setup.py
install --help says:
--no-compile don't compile .py files
Ciao
Marc
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev