python2.6 related changes

Matthias Klose doko at ubuntu.com
Sat Feb 21 16:09:23 GMT 2009


Marius Gedminas schrieb:
> On Fri, Feb 20, 2009 at 05:00:14PM +0100, Matthias Klose wrote:
>> python2.6 is now in the archive and is added as a supported python version,
>> python2.4 is dropped as a supported python version.
> 
> But it will still be installable from universe, right?

yes, to be decided if it will stay in main or universe. If we want to build
extensions for 2.4 from the same source of the extension, then it has to stay in
main. to demote it, we would need to copy all source packages which build with
2.4 and upload those to universe. There is a set of packages for 2.4 needed to
support zope2.x and plone.

>> Starting with python2.6, the default installation points to
>> /usr/local/lib/pythonX.Y/dist-packages, while files for packages
>> included in the distribution are found in
>> /usr/lib/pythonX.Y/dist-packages. This is to avoid overwriting files
>> installed by local admins/users.  The python packaging helpers are
>> modified to do the right thing with files in these locations; for new
>> packages please add for distutils based installations (setup.py
>> --install) the extra option --install-layout=deb. This option is
>> recognized for python2.4 and python2.5 as well, and ignored.
> 
> This sounds sane and welcome.
> 
> Does upstream Python 2.6 know about --install-layout=deb, or is this
> implemented by a Debian/Ubuntu patch to distutils?  I assume the latter,
> but would welcome the clarification.

No, currently not upstream.

> I have a couple of questions about setuptools, which is pretty popular
> despite not being mature enough to be included in the standard library.
> 
> Will users be able to run
> 
>   sudo easy_install packagename
> 
> and get that package installed into
> /usr/local/lib/pythonX.Y/dist-packages?

Yes.

> Previously the package would be
> installed into /usr/lib/pythonX.Y/site-packages, possibly overwriting
> Debian-packaged files.
> 
> Will users be able to run
> 
>   sudo apt-get install python-virtualenv
>   virtualenv /tmp/sandbox
> 
> and be able to use Python packages installed into
> /usr/{,local/}lib/pythonX.Y/dist-packages from the interpreter in
> /tmp/sandbox/bin/python?  I ask because currently virtualenv creates a
> symlink forest in /tmp/sandbox/lib/python2.x/site-packages and probably
> needs to be explicitly taught about the new dist-packages directories.

I will have a look at virtualenv. afair virtualenv does download it's own copy
of setuptools.

> And another question, probably not related directly to the site-packages to
> dist-packages switch, but it also concerns setuptools and the default
> sys.path: Will users ever be able to run easy_install without sudo and
> be able to install additional Python packages somewhere in their $HOME?

should be possible, if you install using the --prefix option.

  Matthias




More information about the ubuntu-devel mailing list