Linux installation

Bruce Sherwood <[email protected]>
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
I wonder whether someone on the list can help me with a puzzle having
to do with installing on Linux.

In acinclude.m4 is the following fragment which attempts to identify
where to install modules such as Visual:

[am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig;
print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX').replace('\\\\\','/'))"
2>/dev/null ||
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/dist-packages"`]

When autogen.sh and configure are run before doing a make to build
Visual, this fragment generates a reference to site-packages, which is
unfortunate, because on Ubuntu with Python 2.x site-packages is not
normally on the module search path.

If on the other hand I execute the following I get a reference to
dist-packages, as expected and desired:

from distutils import sysconfig
print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')

I can't understand why I'm getting a reference to site-packages in the
autoconfigure machinery. I'm reluctant to hand-code "dist-packages"
because for all I know other Linux distributions use site-packages and
have site-packages on the module search path. (As an aside, I'm
annoyed that Ubuntu has left site-packages off the search path, though
I notice that it seems to be back on the search path for Python 3.)

Bruce Sherwood

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.