[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
patch for PYVER setup
- From: MATSUURA Takanori <t-matsuu protein osaka-u ac jp>
- To: rpm-list redhat com
- Subject: patch for PYVER setup
- Date: Wed, 05 Dec 2001 11:49:31 +0900 (JST)
Hi.
Here is a patch for building rpm-python on any version of python.
BuildRequires: python-devel >= 1.5.2
in rpm.spec.in is not changed. But this is not a mistake.
Developers of rpm should set the really required version manualy same
as configure.in.
MATSUURA Takanori @ Division of Protein Chemistry,
Institute for Protein Research, Osaka University, Japan
E-Mail: t-matsuu@protein.osaka-u.ac.jp
Web Page: http://chux1.protein.osaka-u.ac.jp/~t-matsuu/
diff -Naur rpm-4.0.3.orig/configure.in rpm-4.0.3/configure.in
--- rpm-4.0.3.orig/configure.in Wed Aug 15 23:00:27 2001
+++ rpm-4.0.3/configure.in Wed Dec 5 11:37:27 2001
@@ -798,23 +798,26 @@
AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
if test $withval = auto ; then
- AC_MSG_CHECKING(for python 1.5.2)
- AC_TRY_RUN([
-#include <python1.5/Python.h>
-main() {
- exit(strcmp("1.5.2", PY_VERSION));
-} ],
- withval=yes, withval=no, withval=yes)
- AC_MSG_RESULT($withval)
+ AC_MSG_CHECKING(for python >= 1.5.2)
+ changequote(<<, >>)dnl
+ vers=`python -c 'import sys ; print sys.version[0:3]'`
+ changequote([, ])dnl
fi
-if test $withval = yes ; then
- WITH_PYTHON_SUBDIR=python
- WITH_PYTHON_SUBPACKAGE=1
-else
- WITH_PYTHON_SUBDIR=
- WITH_PYTHON_SUBPACKAGE=0
-fi
+case $vers in
+ '')
+ AC_MSG_RESULT(no)
+ WITH_PYTHON_SUBDIR=
+ WITH_PYTHON_SUBPACKAGE=0
+ ;;
+ *)
+ PYVER=$vers
+ AC_MSG_RESULT($vers)
+ WITH_PYTHON_SUBDIR=python
+ WITH_PYTHON_SUBPACKAGE=1
+ ;;
+esac
+AC_SUBST(PYVER)
AC_SUBST(WITH_PYTHON_SUBDIR)
AC_SUBST(WITH_PYTHON_SUBPACKAGE)
diff -Naur rpm-4.0.3.orig/python/Makefile.am rpm-4.0.3/python/Makefile.am
--- rpm-4.0.3.orig/python/Makefile.am Sun Jul 22 04:44:15 2001
+++ rpm-4.0.3/python/Makefile.am Wed Dec 5 11:37:27 2001
@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = 1.4 foreign
-PYVER=1.5
+PYVER=@PYVER@
INCLUDES = \
-I$(top_srcdir) \
diff -Naur rpm-4.0.3.orig/rpm.spec.in rpm-4.0.3/rpm.spec.in
--- rpm-4.0.3.orig/rpm.spec.in Tue Nov 6 05:24:49 2001
+++ rpm-4.0.3/rpm.spec.in Wed Dec 5 11:37:46 2001
@@ -90,7 +90,7 @@
Summary: Python bindings for apps which will manipulate RPM packages.
Group: Development/Libraries
Requires: rpm = %{rpm_version}
-Requires: python >= 1.5.2
+Requires: python >= @PYVER@
Requires: popt = 1.6.3
%description python
@@ -448,8 +448,8 @@
%if %{with_python_subpackage}
%files python
%defattr(-,root,root)
-%{__prefix}/lib/python1.5/site-packages/rpmmodule.so
-%{__prefix}/lib/python1.5/site-packages/poptmodule.so
+%{__prefix}/lib/python@PYVER@/site-packages/rpmmodule.so
+%{__prefix}/lib/python@PYVER@/site-packages/poptmodule.so
%endif
%if %{with_perl_subpackage}
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]