From: Alan W. I. <ir...@be...> - 2003-01-18 22:41:43
|
On Sat, 18 Jan 2003, Maurice LeBrun wrote: > Unfortunately this doesn't work. Putting: > > # Fixes to work with python 1.5 under RH 7.3 > > enable_python="yes" > PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'` > export PYTHON_INC_DIR=/usr/include/python${PY_VERSION}/ > export PYTHON_MOD_DIR=/usr/lib/python${PY_VERSION}/ > export PYTHON_CFG_DIR=${PYTHON_MOD_DIR}/config > export PYTHON_NUM_DIR=${PYTHON_INC_DIR}/Numeric/ > export PYTHON_MACH_DIR=${PYTHON_MOD_DIR}/site-packages > export PYTHON_DIR=${PYTHON_MACH_DIR} > > in my ~/config/cf_plplot.in, gives the following line in > bindings/python/Makefile: > > ourpythondir = ${prefix}//usr/lib/python1.5//site-packages > > so since I have set prefix to $HOME/tools, this results in absolute nonsense. > The culprit is: > > ourpythondir = ${prefix}/@PYTHON_INSTDIR@ > > in bindings/python/Makefile.am. How to fix this? Sorry, I gave you a specific example that is hard to generalize since it mixes two different prefixes (the one for the python that is already installed and the one for the plplot to be installed) which are both /usr in this specific case of building rpm's. I think almost all of these variables are essentially unused for the new configuration system which does the same thing an entirely different way. For example, see how the python version is set with the new configuration scheme. (See info automake and search there for PYTHON_VERSION.) For now, I am not going to hack out all this stuff from sysloc.in so you will still have to set all those variables (although they will be mostly meaningless except to bypass the bad sysloc.in logic when you have a split python system). To my knowledge the only variable that matters now is PYTHON_INSTDIR which is used in bindings/python/Makefile.am and which therefore is used to create ourpythondir. sysloc.in sets this variable using PYTHON_INSTDIR=`echo $PYTHON_DIR | sed s%$prefix/%%` So I think you have to change the last line above. Use export PYTHON_DIR=$HOME/tools/lib/python${PY_VERSION}/site-packages (or is that ${HOME}?) instead. That should turn the outpythondir definition into ourpythondir = ${prefix}/lib/python1.5//site-packages which is exactly what you want if the version associated with the python command (not python2!) is 1.5. Anyhow, please change the last export line and let me know whether that works. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the Canadian Centre for Climate Modelling and Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting software package (plplot.org). __________________________ Linux-powered Science __________________________ |