Martin Pitt added the comment:
In this new code:
mod_file = os.path.abspath(getattr(module, '__file__',
full_path))
realpath = os.path.splitext(os.path.realpath(mod_file))[0]
fullpath_noext =
os.path.splitext(os.path.realpath(full_path))[0]
we get
modfile ==
/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/test_error.pyc
realpath == /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/test_error
fullpath_noext == /usr/share/pyshared/lazr/restfulclient/tests/test_error
for this file:
lrwxrwxrwx 1 root root 71 Mai 26 2013
/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/test_error.py ->
../../../../../../share/pyshared/lazr/restfulclient/tests/test_error.py
Which is as expected in Debian/Ubuntu as the *.pyc file is a real file in
/usr/lib/python2.7, but the *.py is symlinked to /usr/share/.
This new patch essentially enforces that the *.py file is not a symlink, which
breaks the Debian-ish way of installing python 2 modules.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19352>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com