PEP 314 - requirements for Python itself

2006-06-23 Thread Mark Nottingham
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?

Cheers,

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

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP 314 - requirements for Python itself

2006-06-23 Thread Mark Nottingham
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 <[EMAIL PROTECTED]> 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/

-- 
http://mail.python.org/mailman/listinfo/python-list


Fwd: PEP 314 - requirements for Python itself

2006-06-23 Thread Mark Nottingham
I was thinking more about things where people can search for packages  
that need different versions of python, etc.; not so much for  
automation.

On 2006/06/23, at 6:05 PM, Serge Orlov wrote:

> On 6/23/06, Mark Nottingham <[EMAIL PROTECTED]> wrote:
>> 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.
>
> I'm sure writing English text like "make sure you have python 2.4
> before downloading this package" is not abnormal :) How do you expect
> to prevent users from downloading your package if they don't have
> python your package needs? It could be useful if there was a tool to
> silently download and install python, but I'm sure it is a pain to
> code and support such a tool, so nobody was crazy enough to do it.


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

-- 
http://mail.python.org/mailman/listinfo/python-list