[Distutils] Problems installing otrace - unexpanded "@libdir@" string

Skip Montanaro skip at pobox.com
Sun Feb 10 16:09:12 CET 2013

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 /
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 ->
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
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
# EASY-INSTALL-ENTRY-SCRIPT: 'otrace==0.30.9','console_scripts','otrace'
__requires__ = 'otrace==0.30.9'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
        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...


More information about the Distutils-SIG mailing list