PEP 314 - requirements for Python itself

Mark Nottingham mnot at mnot.net
Fri Jun 23 20:56:38 CEST 2006


Yep, I'm doing that (thanks!).

I was looking for some normal (hopefully, machine-readable) way to  
indicate it so that people can figure out the version of Python  
required before they download the package.


On 2006/06/23, at 11:04 AM, Serge Orlov wrote:

> 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
> -- 
> http://mail.python.org/mailman/listinfo/python-list


--
Mark Nottingham     http://www.mnot.net/




More information about the Python-list mailing list