Hi, 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. The 2000-1-17 snapshot doesn't install. Here is the error (wrapped to make mailers happy): File "/opt/hppd/lib/python1.5/site-packages/distutils/command/build_lib.py", line 26 self. = None ^ SyntaxError: invalid syntax -- Stephen Walton, Professor, Dept. of Physics & Astronomy, Cal State Northridge stephen.walton@csun.edu
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
On 26 January 2000, Stephen Walton said:
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.
For the record (ie. for the list archive and collective benefit of the SIG), here's how this one was resolved: Stephen rebuilt and reinstalled Python. It turns out that his $exec_prefix/lib/python1.5/config/Makefile was the wrong file; it looks to me as though it was generated from $exec_prefix/lib/python1.5/config/Makefile.pre.in. The only way I can see this happening is if someone runs "make -f Makefile.pre.in" *right in the $exec_prefix/lib/python1.5/config directory* -- which of course they're not supposed to do, but there's nothing stopping them from doing it. Oops. Anyways, a Python reinstall put the proper Makefile into the config directory, and now all is well for Stephen. Hooray. I feel like a Microsoft tech support weenie -- "just reinstall and everything will be Just Fine". Greg
participants (2)
-
Greg Ward
-
Stephen Walton