[Distutils] distutils on hpux

Greg Ward gward@cnri.reston.va.us
Tue, 1 Feb 2000 08:51:51 -0500


On 26 January 2000, Stephen Walton said:
> I just joined the list but am not sure I should have :-).  I really just
> want to get distutils working on our HP/UX 10.20 host so I can install
> NumPy.
> 
> Using the 0.1.2 release, all the tests fail, basically because "from
> sysconfig import AR" fails.  Where should that come from?  It appears it
> should be in the config.h set up when I built Python, but I can't find it.

Hmmm.  You're close, but `AR' is actually supposed to be set in the
Makefile installed with Python.  (Both config.h and Makefile are read by
sysconfig, and all the "variables" -- C macros and make variables -- in
those two files are exposed as Python global variables.  Once the two
files are parsed, there's no way to know if a given Python variable
originated in config.h or Makefile.)

Anyways, here's how things look on my system (Python 1.5.2 on Solaris
2.6):

$ python
Python 1.5.2 (#1, Dec 16 1999, 16:50:40)  [GCC 2.8.1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import os
>>> from distutils import sysconfig
>>> sysconfig.get_makefile_filename()
'/usr/local/python/lib/python1.5/config/Makefile'
>>> os.system ("grep '^AR' %s" % _)
AR=             ar
0
>>> sysconfig.AR
'ar'

Would you mind trying that out on your machine and tell us what the
results are?  If AR is not defined in your Makefile, then that's a
problem with portability-across-Python-platforms that I need to know
about.  If AR is defined and sysconfig isn't picking it up, that's a bug
in sysconfig that I (and Fred Drake! ;-) need to know about.

Sorry for the long delay in replying -- speculating about future
features is so much more fun than fixing old bugs... *sigh*...

        Greg