[Distutils] requiring python 2.5

Ryan O'Neil ryanjoneil at gmail.com
Tue Jun 5 19:03:57 CEST 2007

My apologies if this was already covered; I couldn't find appropriate
mention of the issue.

What is the best way to require Python 2.5 in setuptools?  In PyGEP
0.1.2 I did the following:

        # --- snip ---
        install_requires = ['python>=2.5'],
        # --- snip ---

This worked wonderfully on Linux using setuptools 0.6c5, but on
Windows (also with Python 2.5 and setuptools 0.6c5), it couldn't
recognize the installed version of Python and tried to download and
compile it (python) from source.

Granted this seems like the wrong thing to do.

I was able to get things mostly working by getting rid of the
install_requires line and adding this code to my setup.py:

    import sys

    if sys.version_info[:2] < (2, 5):
        raise Exception('PyGEP requires Python 2.5')

However, easy_install will now download PyGEP for Python 2.4 and fail
during setup, which is less than ideal (and ends up with cheesecaking
slandering its installability ;).  Am I just doing everything
completely wrong?  There is some more information about the error


Thanks for your help and thanks for setuptools!


More information about the Distutils-SIG mailing list