build_requires support

Bug #138260 reported by Martijn Faassen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

In bug #110133 (setup.py needs code from another egg to build) the case was discussed where a setup.py of a package could not proceed because other eggs were expected to be on the python path. A mention of build_requires was made as a possible solution, though in that this would not work, as I had no control over the other package's setup.py.

This time I'm writing a package myself so I could set a build_requires to mention that cython needs to be installed before building (http://www.cython.org/). There does not seem to be any response to using this command, however. Is this correct? I can find no clear documentation on this command - the only time it comes up is in the context of generating RPMs.

Here's my setup.py:

from setuptools import setup # tried with plain distutils too
from distutils.extension import Extension

from Cython.Distutils import build_ext

setup(
    name = "unbound",
    package_dir = {'': 'src'},
    packages = ['unbound'],
    ext_modules=[
    Extension('unbound.ub', ['src/unbound/ub.pyx', 'src/unbound/unbound.c']),
    ],
    headers=['src/unbound/unbound.h'],
    cmdclass = {'build_ext': build_ext},
    build_requires=['cython'],
    install_requires=['cython'],
    )

This feature, or the feature discussed in #110133 therefore appears to be needed to let buildout install packages that need special tools (such as cython, a fork of pyrex) to let themselves be installed.

Revision history for this message
Sean Gillies (sgillies) wrote :

For what it's worth, my work around uses hexagonit.recipe.download to fetch the Cython source and then uses iw.recipe.cmd to install it into my custom python. See the cython-src and cython-install sections in

http://zcologia.com/sgillies/hg/gdawg/file/tip/buildout.cfg

Revision history for this message
Gabriel de Perthuis (g2p) wrote :

You mean setup_requires, as build_requires is a completely different beast ( http://docs.python.org/distutils/builtdist.html#creating-rpm-packages ). I also would like this setuptools feature to be supported, but an equivalent zc.recipe.egg parameter could be enough.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.