PEP 314 - requirements for Python itself

Serge Orlov serge.orlov at gmail.com
Fri Jun 23 20:04:01 CEST 2006


On 6/23/06, Mark Nottingham <mnot at mnot.net> wrote:
> PEP 314 introduces metadata that explains what packages are required
> by a particular package. Is there any way to express what version of
> Python itself is required?

No, but you can do it yourself:

# do not edit this file, edit actualsetup.py instead
import sys
if sys.version_info < (2, 4):
    print "Error: Python 2.4 or greater is required to use this package"
    sys.exit(1)
import actualsetup

Disclaimer: I haven't actually run or tested this code, but the idea
is to write the checking code that is compatible with very old python
versions and do the actual work in actualsetup.py



More information about the Python-list mailing list