Cannot specify cython under setup_requires

Create issue
Issue #275 wontfix
Jason R. Coombs created an issue

Distribute appears to try to support Cython-based extension modules natively. Specifically, in setuptools.extension and setuptools.command.build_ext, there are specific references to support building Cython modules.

However, this support does not work when Cython is made available via setup_requires (because the tests for the existence of Cython happen before setup_requires-specified packages are loaded).

It would be nice if the package enabled installation of Cython-based packages with a simple setup_requires directive, rather than requiring it to have been installed on the build host before the target package was installed or built.

Comments (3)

  1. Martin Scherer

    this is still not possible in setuptools 7.0. Nevertheless setuptools.Extension class converts the source suffix of given pyx files, but does not actually convert the code, which is IMHO a bug. Using distutils.core.Extension is also not possible (leads to error: each element of 'ext_modules' option must be an Extension instance or 2-tuple), which would be an effictive workaround for the first problem.

  2. Log in to comment