[Python-Dev] Re: Patch level versions and new features (Was: Some dull gc stats)

Fredrik Lundh fredrik@pythonware.com
Tue, 9 Jul 2002 15:50:26 +0200


barry wrote:

>     MAL> The user would in both cases type 'python setup.py install'
>     MAL> but the install command would automatically choose the
>     MAL> right target subdir (site-packages/ or system-packages/).
>=20
> Except you can't always tell if its a system package or an add-on.
> email for example is an add-on for Python 2.1, but a system package
> for Python 2.2.

assuming that the package maintainer is informed when a package
is added to the standard library, that packages won't move in and
out too much, and/or that most users probably don't want to down-
grade to an older package version, you could of course write:

    if sys.version_info >=3D (2, 2):
        pkgtype =3D "system-package"
    else:
        pkgtype =3D "site-package"

    setup(... pkgtype=3Dpkgtype ...)

in your setup.py file, once your package has been added.

</F>