setup_requires with Cython? : <p>I'm creating a <code>setup.py</code> file for a project with some Cython extension modules.</p>

<p>I've already gotten this to work:</p>

<pre><code>from setuptools import setup, Extension
from Cython.Build import cythonize

setup(
    name=...,
    ...,
    ext_modules=cythonize([ ... ]),
)
</code></pre>

<p>This installs fine. However, this assumes Cython is installed. What if it's not installed? I understand this is what the <code>setup_requires</code> parameter is for:</p>

<pre><code>from setuptools import setup, Extension
from Cython.Build import cythonize

setup(
    name=...,
    ...,
    setup_requires=['Cython'],
    ...,
    ext_modules=cythonize([ ... ]),
)
</code></pre>

<p>However, if Cython isn't already installed, this will of course fail:</p>

<pre><code>$ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 2, in &lt;module&gt;
    from Cython.Build import cythonize
ImportError: No module named Cython.Build
</code></pre>

<p>What's the proper way to do this? I need to somehow import <code>Cython</code> only after the <code>setup_requires</code> step runs, but I need <code>Cython</code> in order to specify the <code>ext_modules</code> values.</p>
