[Distutils] minimum Python version
Thomas Heller
thomas.heller@ion-tof.com
Fri Oct 26 08:55:01 2001
From: "M.-A. Lemburg" <mal@lemburg.com>
> Thomas Heller wrote:
> >
> > 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(...)
>
> Right.
>
> > but not in the bdist packages.
>
> The Windows installer is bound to a specific Python version,
> so it won't even install to a different version.
Only if it contains compiled extensions (impure distribution)!
You can, however, specify a required Python version at build time
with the --target-version command line flag, but there is _no_
--minimum-target-version flag.
Thomas