Problems installing otrace - unexpanded "@libdir@" string
At work we use encap to create packages to distribute to our desktops and server. Creating a package involves installing it into an isolated directory, then creating an encap package from the directory's contents. Packages which expect to use distutils are a bit problematic, but with some magic sauce on the command line, these have become tractable. I'm having trouble installing otrace (http://pypi.python.org/pypi/otrace). It appears to go well enough: % python setup.py install --single-version-externally-managed --root / --install-lib=/var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages --prefix=/var/tmp/python27_otrace-0.30.9 running install running build running build_py running install_lib creating /var/tmp/python27_otrace-0.30.9 creating /var/tmp/python27_otrace-0.30.9/lib creating /var/tmp/python27_otrace-0.30.9/lib/python2.7 creating /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages copying build/lib/otrace.py -> /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages byte-compiling /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages/otrace.py to otrace.pyc running install_egg_info running egg_info writing otrace.egg-info/PKG-INFO writing top-level names to otrace.egg-info/top_level.txt writing dependency_links to otrace.egg-info/dependency_links.txt writing entry points to otrace.egg-info/entry_points.txt reading manifest file 'otrace.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'otrace.egg-info/SOURCES.txt' Copying otrace.egg-info to /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages/otrace-0.30.9-py2.7.egg-info running install_scripts Installing otrace script to /var/tmp/python27_otrace-0.30.9/bin When I look at the generated otrace script I see something that doesn't look right though: % cat /var/tmp/python27_otrace-0.30.9/bin/otrace #!/opt/local/bin/python # EASY-INSTALL-ENTRY-SCRIPT: 'otrace==0.30.9','console_scripts','otrace' __requires__ = 'otrace==0.30.9' import sys sys.path.append('@libdir@') from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('otrace==0.30.9', 'console_scripts', 'otrace')() ) What is "@libdir@", and why isn't it being expanded to something useful? This script appears to be generated by Distutils. It's not part of otrace proper. Looking back at other installs (virtualenv, pylint, pip, and a few others), I see that otrace is not the first afflicted package. Unfortunately, all search attempts using Google have failed, as no matter what I've tried, it elides the @-signs from my queries.Needless to say, there are gazillions of instances of "libdir" related to distutils. (Bing seems to behave better in this regard, but still yielded nothing useful.) Any suggestions appreciated. Thx... Skip
On Sun, Feb 10, 2013 at 4:09 PM, Skip Montanaro
At work we use encap to create packages to distribute to our desktops and server. Creating a package involves installing it into an isolated directory, then creating an encap package from the directory's contents. Packages which expect to use distutils are a bit problematic, but with some magic sauce on the command line, these have become tractable. I'm having trouble installing otrace (http://pypi.python.org/pypi/otrace). It appears to go well enough:
% python setup.py install --single-version-externally-managed --root / --install-lib=/var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages --prefix=/var/tmp/python27_otrace-0.30.9 running install running build running build_py running install_lib creating /var/tmp/python27_otrace-0.30.9 creating /var/tmp/python27_otrace-0.30.9/lib creating /var/tmp/python27_otrace-0.30.9/lib/python2.7 creating /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages copying build/lib/otrace.py -> /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages byte-compiling /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages/otrace.py to otrace.pyc running install_egg_info running egg_info writing otrace.egg-info/PKG-INFO writing top-level names to otrace.egg-info/top_level.txt writing dependency_links to otrace.egg-info/dependency_links.txt writing entry points to otrace.egg-info/entry_points.txt reading manifest file 'otrace.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'otrace.egg-info/SOURCES.txt' Copying otrace.egg-info to /var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages/otrace-0.30.9-py2.7.egg-info running install_scripts Installing otrace script to /var/tmp/python27_otrace-0.30.9/bin
When I look at the generated otrace script I see something that doesn't look right though:
% cat /var/tmp/python27_otrace-0.30.9/bin/otrace #!/opt/local/bin/python # EASY-INSTALL-ENTRY-SCRIPT: 'otrace==0.30.9','console_scripts','otrace' __requires__ = 'otrace==0.30.9' import sys sys.path.append('@libdir@') from pkg_resources import load_entry_point
if __name__ == '__main__': sys.exit( load_entry_point('otrace==0.30.9', 'console_scripts', 'otrace')() )
What is "@libdir@", and why isn't it being expanded to something useful? This script appears to be generated by Distutils. It's not part of otrace proper. Looking back at other installs (virtualenv, pylint, pip, and a few others), I see that otrace is not the first afflicted package.
Unfortunately, all search attempts using Google have failed, as no matter what I've tried, it elides the @-signs from my queries.Needless to say, there are gazillions of instances of "libdir" related to distutils. (Bing seems to behave better in this regard, but still yielded nothing useful.)
Any suggestions appreciated. Thx...
I can't reproduce this, nor can I find any reference to @libdir@ either in Python 2.7, Distribute or otrace (0.30.9) //Lennart
On Sun, Feb 10, 2013 at 09:09:12AM -0600, Skip Montanaro wrote:
At work we use encap to create packages to distribute to our desktops and server. Creating a package involves installing it into an isolated directory, then creating an encap package from the directory's contents. Packages which expect to use distutils are a bit problematic, but with some magic sauce on the command line, these have become tractable. I'm having trouble installing otrace (http://pypi.python.org/pypi/otrace). It appears to go well enough:
% python setup.py install --single-version-externally-managed --root / --install-lib=/var/tmp/python27_otrace-0.30.9/lib/python2.7/site-packages --prefix=/var/tmp/python27_otrace-0.30.9 ... When I look at the generated otrace script I see something that doesn't look right though:
% cat /var/tmp/python27_otrace-0.30.9/bin/otrace #!/opt/local/bin/python # EASY-INSTALL-ENTRY-SCRIPT: 'otrace==0.30.9','console_scripts','otrace' __requires__ = 'otrace==0.30.9' import sys sys.path.append('@libdir@') ... What is "@libdir@", and why isn't it being expanded to something useful? This script appears to be generated by Distutils.
Not distutils, but setuptools (or its fork distribute). The EASY-INSTALL-ENTRY-SCRIPT comment is a hint. Here's the source code to the latest Distribute: https://bitbucket.org/tarek/distribute/src/a286137eb40d/setuptools/command/e... It's not what you're running because it doesn't do the 'sys.path.append()' bit. It would help if you could figure out which version of setuptools (or distribute) you're using. python -c 'import setuptools; print(setuptools.__file__)' could give you a hint. Marius Gedminas -- If C gives you enough rope to hang yourself, C++ gives you enough rope to bind and gag your neighborhood, rig the sails on a small ship, and still have enough rope left over to hang yourself from the yardarm.
Marius Gedminas
Not distutils, but setuptools (or its fork distribute).
The EASY-INSTALL-ENTRY-SCRIPT comment is a hint. ...
Thanks for the hint. I will admit to just using this stuff blindly. I am certainly no packaging or distutils (or setuptools) expert. A company called The Written Word provides us with pre-packaged versions of lots of open source software. Python 2.7 is one bit, and with that comes some version of setuptools. Alas, all that it tells me about its version is that it's '0.6'. I'm used to seeing more, like '0.6c11' or similar. I'll poke around a bit more and see if I can narrow down the problem. If worse comes to worst, I may have to lean on TWW to update this package. Thx, Skip
On Mon, Feb 11, 2013 at 1:06 PM, Skip Montanaro
Marius Gedminas
writes: Not distutils, but setuptools (or its fork distribute).
The EASY-INSTALL-ENTRY-SCRIPT comment is a hint. ...
Thanks for the hint. I will admit to just using this stuff blindly. I am certainly no packaging or distutils (or setuptools) expert.
A company called The Written Word provides us with pre-packaged versions of lots of open source software. Python 2.7 is one bit, and with that comes some version of setuptools. Alas, all that it tells me about its version is that it's '0.6'. I'm used to seeing more, like '0.6c11' or similar.
See this issue for some things to try to get a better version number for Distribute: https://bitbucket.org/tarek/distribute/issue/347/provide-a-way-to-get-distri... --Chris
I'll poke around a bit more and see if I can narrow down the problem. If worse comes to worst, I may have to lean on TWW to update this package.
Thx,
Skip
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
participants (4)
-
Chris Jerdonek
-
Lennart Regebro
-
Marius Gedminas
-
Skip Montanaro