
Hi, Is there any way to specify in setup.py that a particular distribution requires e.g. Python 2.2, such that an error is issued if users try to install it on an earlier Python version? Thanks, Peter

Peter Bienstman wrote:
Hi,
Is there any way to specify in setup.py that a particular distribution requires e.g. Python 2.2, such that an error is issued if users try to install it on an earlier Python version?
import sys if sys.version < '2.2': print 'Wrong Python Version !!!' sys.exit(1) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/

Is there any way to specify in setup.py that a particular distribution requires e.g. Python 2.2, such that an error is issued if users try to install it on an earlier Python version?
import sys if sys.version < '2.2': print 'Wrong Python Version !!!' sys.exit(1)
Yes, but I assume this won't show up when e.g. executing a binary installer for Windows? Peter

Peter Bienstman wrote:
Is there any way to specify in setup.py that a particular distribution requires e.g. Python 2.2, such that an error is issued if users try to install it on an earlier Python version?
import sys if sys.version < '2.2': print 'Wrong Python Version !!!' sys.exit(1)
Yes, but I assume this won't show up when e.g. executing a binary installer for Windows?
That's correct. The bdist_wininst command has an option for this though: ('target-version=', 'v', "require a specific python version" + " on the target system"), -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
participants (3)
-
M.-A. Lemburg
-
Peter Bienstman
-
Peter Bienstman