[Distutils] minimum Python version

Thomas Heller thomas.heller@ion-tof.com
Fri Oct 26 04:51:01 2001


From: "Edward D. Loper" <edloper@gradient.cis.upenn.edu>
> 
> Is there a way to specify a minimum Python version that's required
> by a distutils package?  E.g., if I make a package, and I know
> it requires Python 2.1, I'd like it to check the version of Python
> on the system where it's being installed, to make sure that it's
> at least 2.1.
> 
Only in the setup script:

import sys
if sys.hexversion < 0x02010100:
   raise RuntimeError, "Python 2.1.1 or higher required"

setup(...)

but not in the bdist packages.

Thomas