This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author anal.phabet
Recipients anal.phabet
Date 2012-09-27.19:15:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348773319.59.0.614057803377.issue16065@psf.upfronthosting.co.za>
In-reply-to
Content
setup.py loses the DESTDIR aka --root iff "/" is passed as prefix


http://seclists.org/nmap-dev/2012/q3/1025

I can reproduce this now, but only with a prefix of "/". For example,
this works:

$ python setup.py install --prefix "/a" --root "/home/david/destdir"
copying build/scripts-2.7/ndiff -> /home/david/destdir/a/bin

But this doesn't:

$ python setup.py install --prefix "/" --root "/home/david/destdir"
copying build/scripts-2.7/ndiff -> /bin

This looks like a Python/distutils bug.


the same seems to happen on python install:
when installing python 2.7.2, "2to3", "idle", "pydoc" and "smptd.py" are installed into /bin rather than into the chosen destdir

./python -E ./setup.py install \
        --prefix=/ \
        --install-scripts=//bin \
        --install-platlib=//lib/python2.7/lib-dynload \
        --root=//opt/python/
[...]
running install
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers


running install_scripts
copying build/scripts-2.7/smtpd.py -> /bin
copying build/scripts-2.7/idle -> /bin
copying build/scripts-2.7/pydoc -> /bin
copying build/scripts-2.7/2to3 -> /bin
changing mode of /bin/smtpd.py to 755
changing mode of /bin/idle to 755
changing mode of /bin/pydoc to 755
changing mode of /bin/2to3 to 755
running install_egg_info
Writing /lib/python2.7/lib-dynload/Python-2.7.2-py2.7.egg-info
if test -f //opt/python//bin/python -o -h //opt/python//bin/python; \
then rm -f //opt/python//bin/python; \
else true; \
fi
(cd //opt/python//bin; ln python2.7 python)
rm -f //opt/python//bin/python-config
(cd //opt/python//bin; ln -s python2.7-config python-config)
test -d //opt/python//lib/pkgconfig || /bin/install -c -d -m 755 //opt/python//lib/pkgconfig
rm -f //opt/python//lib/pkgconfig/python.pc
[snip]
History
Date User Action Args
2012-09-27 19:15:19anal.phabetsetrecipients: + anal.phabet
2012-09-27 19:15:19anal.phabetsetmessageid: <1348773319.59.0.614057803377.issue16065@psf.upfronthosting.co.za>
2012-09-27 19:15:19anal.phabetlinkissue16065 messages
2012-09-27 19:15:18anal.phabetcreate