Gaetano Mendola wrote:
> Joe Conway wrote:
>> # python -c "from distutils.sysconfig import get_python_lib as f;
>> import os; print
>> os.path.join(f(plat_specific=1,standard_lib=1),'config')"
>> /usr/lib64/python2.3/config
>>
>> Any other proposals? If not, any objections to the attached patch?
>
> No one, we have to check also for the presence of distutils package
> installation.
> It's not installed by default and I was bitten by it during the RPM
> building for
> RH AS 2.1
What version of python comes with RH2.1?
In any case, the online documentation for python suggests that it is
reasonable to expect that distutils is already installed (by default for
python >= 1.6, and by the user for python 1.5.2). See:
http://www.python.org/doc/2.2.3/dist/intro.html
If there are no other objections, I'll commit the attached in about 24
hours.
Thanks,
Joe
Index: config/python.m4
===================================================================
RCS file: /cvsroot/pgsql-server/config/python.m4,v
retrieving revision 1.7
diff -c -r1.7 python.m4
*** config/python.m4 29 Nov 2003 19:51:17 -0000 1.7
--- config/python.m4 10 Sep 2004 22:15:38 -0000
***************
*** 25,31 ****
python_version=`${PYTHON} -c "import sys; print sys.version[[:3]]"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
! python_configdir="${python_execprefix}/lib/python${python_version}/config"
python_includespec="-I${python_prefix}/include/python${python_version}"
if test "$python_prefix" != "$python_execprefix"; then
python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
--- 25,31 ----
python_version=`${PYTHON} -c "import sys; print sys.version[[:3]]"`
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
! python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print
os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
python_includespec="-I${python_prefix}/include/python${python_version}"
if test "$python_prefix" != "$python_execprefix"; then
python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"