|
From: Alan W. I. <ir...@be...> - 2002-08-19 16:42:37
|
On Mon, 19 Aug 2002, Maurice LeBrun wrote:
> Just a FYI. I decided to try once again to get the python bindings to work on
> my RH7.3 machines. First I built & installed the latest swig, making sure it
> came first in my path, and then that part was traversed correctly.
Good!
> However
> more problems:
>
> 1. During the make I get:
>
> python setup.py build --force --build-temp="./" --build-lib="./" --flat
> Traceback (innermost last):
> File "setup.py", line 45, in ?
> libs_list = libs.split(" ")
> AttributeError: 'string' object has no attribute 'split'
> make: *** [plplotcmodule.so] Error 1
>
> where "python" for RH7.3 is python1.5. Is python1.5 no longer supported?
We should support it for now, and thanks very much for testing that support
(which I cannot do on my Debian system which is fully converted to python 2).
Before, I found python2 was not reliable in RH7.2 so I used python1.5 in
that case. If you look at plplot/rpm/plplot_redhat7.2.spec, you will see I
did the following there:
PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
export PYTHON_INC_DIR=/usr/include/python${PY_VERSION}/
echo PYTHON_INC_DIR=${PYTHON_INC_DIR}
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}
./configure ...
I would stick with python-1.5 until RedHat are confident enough of python-2
to call the associated command "python" rather than "python2".
To solve the above and other split problems, I have just committed
a revised setup.py.in to cvs which replaces the python 2.x method, e.g.,
incs_list = incs.split(" ")
with the python 1.5 (and python 2.x) string function
incs_list = string.split(incs," ")
Please give that a try, and I hope that weeds out all python-2 only constructs
that have crept in since plplot-5.1.0.
Alan
|