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

M.-A. Lemburg mal@lemburg.com
Tue, 09 Jul 2002 16:15:15 +0200


Fredrik Lundh wrote:
> 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/).
>>
>>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 >= (2, 2):
>         pkgtype = "system-package"
>     else:
>         pkgtype = "site-package"
> 
>     setup(... pkgtype=pkgtype ...)
> 
> in your setup.py file, once your package has been added.

Right.

A package author whose package moves into the core would have
to do this anyway, if s/he wants to maintain backwards compatibility
with older Python versions, since the distutils package in those
versions would not accept the new keyword.

Anyway, regardless of how we do it, we need to add the
'system-packages' dir to just before the '.../lib/pythonX.X'
entry in sys.path. If there's consent about this, I'd suggest
to move ahead in this direction as first step.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/