autoconf: how to get python_libdir correctly?
Michael Hudson
mwh at python.net
Wed Dec 4 11:41:18 EST 2002
Gernot Hillier <ghillie at suse.de> writes:
> <veröffentlicht & per Mail versendet>
Really? Don't see it. Never mind.
> Michael Hudson wrote:
>
> >>>> from distutils import sysconfig
> >>>> sysconfig.get_config_var("LIBDEST")
> > '/usr/lib/python2.2'
> >
> > is my best effort.
>
> Hmmm... Unfortunately, LIBDEST gives me a wrong value here:
>
> >>> from distutils import sysconfig
> >>> sysconfig.get_config_vars('LIBDEST')
> ['/usr/lib/python2.2']
Odd.
> But thanks to your suggestion I read the docu of distutils.sysconfig and
> found:
>
> >>> sysconfig.get_python_lib()
> '/usr/lib64/python2.2/site-packages'
> >>> sysconfig.get_python_lib(0,1)
> '/usr/lib64/python2.2'
>
> What about this? Any reasons not to use this one?
Looks OK to me.
> BTW: Any idea why LIBDEST is wrong?
No, that's very strange.
> I looked into pyconfig.h and it doesn't contain DEST or LIBDEST at
> all. Is it possible that python uses some (wrong) default in this
> case?
Python picks the variable out of the Makefile. If I read the Makefile
correctly, it installs the Python standard library to $(LIBDEST),
which makes me wonder how your installation got installed...
Cheers,
M.
--
If you have too much free time and can't think of a better way to
spend it than reading Slashdot, you need a hobby, a job, or both.
-- http://www.cs.washington.edu/homes/klee/misc/slashdot.html#faq
More information about the Python-list
mailing list