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/easy_install.py?at=default#cl-1815 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.
signature.asc
Description: Digital signature
_______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
