2009/4/1 Nicolas Dumazet <[email protected]>: > I looked at ways to avoid the extra setup.py work, it seems there's no > "easy way" here. > I thought about extending the distutils build command to build the c > files before the module build, but it's definitely not simple: if the > C files are correctly generated, one would need to register the C > extensions on the fly, once the build process has already started; and > I'm not sure that this is possible. > And yes, if it is not possible, one would need to write a complex > build system handling the whole compilation chain.
Or... the setup.py behavior could be modified: When --no-cython-compile is not provided, if the system is not able to generate the .c, it bails out, spitting out an error, instead of trying to back out "intelligently" to the pure python implementation by itself. This would make the setup.py implementation much more simple: * If --no-cython-compile is here, there's almost nothing to do. * If it's not here, add the dependences on the C extensions, extend the build_ext distutils command to generate the C files before building the cython module, (this is actually easy to do) and... voilà! Just exit with an error if you can't generate the C files, suggest to try --no-cython-compile instead. -- Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ] _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
