Package: python2.7
Version: 2.7.3~rc2-2.1
Severity: normal

The Xen build system contains some python modules which it installs
with:
        $(PYTHON) setup.py build
        $(PYTHON) setup.py install --prefix=$(PREFIX) --force

Where $(PREFIX) is by default "/usr", $(PYTHON) is just "python" and
setup.py uses distutils.

This results in the python files being installed in
/usr/lib/python2.7/site-packages/ which is not present in sys.path.

Removing the --prefix=$(PREFIX) results in installation into
/usr/local/lib/python2.7/dist-packages/ which is in the sys.path (so
correct in that sense) but doing this in the Xen tree removes the
option for people to install Xen to an alternate prefix (e.g. I think
NetBSD uses --prefix=/usr/pkg or some such).

As a workaround one can use "--prefix=$(PREFIX) --install-layout=deb"
but it seems wrong to require end users building stuff from source on
their systems (as opposed to packagers) to know about and use
this. We (Xen.org upstream) have a steady stream of bug reports from
users whose modules have ended up outside of sys.path in this way.

Also the debian/changelog for 2.6.1-3 says "The options
--install-layout=deb and --prefix are exclusive." (I think this meant
to say "mutually exclusive"?) so I don't think this is intentionally
supported (this is what we actually recommend in practice, but we'd
rather not).

Something similar was discussed in #LP362570 but I think this case is
sligthly different, this is a python module being built from source by
the end use against the system/distro python rather than against a
custom installed python in /usr/local.

Changing unix_prefix to use dist- instead of site-packages would fix
this issue, I think.

There seems to be concern about modules built for the system- vs
custom-python clashing with each other. My expecation would be that if
you were building against a custom python then you would be using the
version of distutils supplied by that python (e.g. running
/my/custom/python setup.py not /usr/bin/python ...), which would be
using site-packages as expected. Therefore changing the system
installed distutils to use the right path for the system installed
python seems correct.

Thanks.
Ian.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python2.7 depends on:
ii  libbz2-1.0         1.0.6-4
ii  libc6              2.13-35
ii  libdb5.1           5.1.29-5
ii  libexpat1          2.1.0-1
ii  libgcc1            1:4.7.1-7
ii  libncursesw5       5.9-10
ii  libreadline6       6.2-8
ii  libsqlite3-0       3.7.13-1
ii  libtinfo5          5.9-10
ii  mime-support       3.52-1
ii  python2.7-minimal  2.7.3~rc2-2.1

python2.7 recommends no packages.

Versions of packages python2.7 suggests:
ii  binutils       2.22-6.1
pn  python2.7-doc  <none>

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to