- autodetect python 1.5/2.2.
CVS patchset: 5242 CVS date: 2002/01/07 20:01:00
This commit is contained in:
parent
a6faa04f39
commit
0776a0c425
1
CHANGES
1
CHANGES
|
@ -88,6 +88,7 @@
|
|||
- sparc: make dbenv per-rpmdb, not per-dbi.
|
||||
- handle lazy db open's in chroot with absolute path, not prefix strip.
|
||||
- Depends should use CDB if configured.
|
||||
- autodetect python 1.5/2.2.
|
||||
|
||||
4.0.2 -> 4.0.3:
|
||||
- update per-interpreter dependency scripts, add sql/tcl (#20295).
|
||||
|
|
30
configure.in
30
configure.in
|
@ -832,23 +832,42 @@ if test "$rpm_cv_glob" = yes; then
|
|||
LIBOBJS="$LIBOBJS glob.o fnmatch.o"
|
||||
fi
|
||||
dnl
|
||||
dnl Auto-detect whether python bindings should be built.
|
||||
dnl Auto-detect which python bindings should be built.
|
||||
dnl
|
||||
withval=auto
|
||||
AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
|
||||
|
||||
WITH_PYTHON_VERSION=
|
||||
if test $withval = auto ; then
|
||||
AC_MSG_CHECKING(for python 1.5.2)
|
||||
|
||||
AC_MSG_CHECKING(for python 2.2)
|
||||
AC_TRY_RUN([
|
||||
#include <python2.2/Python.h>
|
||||
main() {
|
||||
exit(strncmp("2.2", PY_VERSION, 3));
|
||||
} ],
|
||||
withval=yes, withval=no, withval=yes)
|
||||
AC_MSG_RESULT($withval)
|
||||
if test $withval = yes ; then
|
||||
WITH_PYTHON_VERSION="2.2"
|
||||
else
|
||||
|
||||
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)
|
||||
withval=yes, withval=no, withval=yes)
|
||||
AC_MSG_RESULT($withval)
|
||||
if test $withval = yes ; then
|
||||
WITH_PYTHON_VERSION="1.5"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test $withval = yes ; then
|
||||
if test -n "$WITH_PYTHON_VERSION" ; then
|
||||
WITH_PYTHON_SUBDIR=python
|
||||
WITH_PYTHON_SUBPACKAGE=1
|
||||
else
|
||||
|
@ -857,6 +876,7 @@ else
|
|||
fi
|
||||
AC_SUBST(WITH_PYTHON_SUBDIR)
|
||||
AC_SUBST(WITH_PYTHON_SUBPACKAGE)
|
||||
AC_SUBST(WITH_PYTHON_VERSION)
|
||||
|
||||
AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH)
|
||||
dnl
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
PYVER=1.5
|
||||
PYVER= @WITH_PYTHON_VERSION@
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
|
|
|
@ -146,6 +146,7 @@ WITH_DB_SUBDIR = @WITH_DB_SUBDIR@
|
|||
WITH_INTERNAL_DB = @WITH_INTERNAL_DB@
|
||||
WITH_PYTHON_SUBDIR = @WITH_PYTHON_SUBDIR@
|
||||
WITH_PYTHON_SUBPACKAGE = @WITH_PYTHON_SUBPACKAGE@
|
||||
WITH_PYTHON_VERSION = @WITH_PYTHON_VERSION@
|
||||
WITH_ZLIB_INCLUDE = @WITH_ZLIB_INCLUDE@
|
||||
WITH_ZLIB_LIB = @WITH_ZLIB_LIB@
|
||||
WITH_ZLIB_SUBDIR = @WITH_ZLIB_SUBDIR@
|
||||
|
@ -188,7 +189,7 @@ varprefix = @varprefix@
|
|||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
PYVER = 1.5
|
||||
PYVER = @WITH_PYTHON_VERSION@
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
|
|
12
rpm.spec
12
rpm.spec
|
@ -1,4 +1,5 @@
|
|||
%define with_python_subpackage 0 %{nil}
|
||||
%define with_python_subpackage 1 %{nil}
|
||||
%define with_python_version 2.2 %{nil}
|
||||
%define with_perl_subpackage 1
|
||||
%define with_bzip2 1 %{nil}
|
||||
%define with_apidocs 1 %{nil}
|
||||
|
@ -45,7 +46,7 @@ BuildRequires: zlib-devel
|
|||
BuildRequires: bzip2 >= 0.9.0c-2
|
||||
%endif
|
||||
%if %{with_python_subpackage}
|
||||
BuildRequires: python-devel >= 1.5.2
|
||||
BuildRequires: python-devel >= %{with_python_version}
|
||||
%endif
|
||||
%if %{with_perl_subpackage}
|
||||
BuildRequires: perl >= 0:5.00503
|
||||
|
@ -90,7 +91,7 @@ build packages using RPM.
|
|||
Summary: Python bindings for apps which will manipulate RPM packages.
|
||||
Group: Development/Libraries
|
||||
Requires: rpm = %{rpm_version}
|
||||
Requires: python >= 1.5.2
|
||||
Requires: python >= %{with_python_version}
|
||||
Requires: popt = 1.7
|
||||
|
||||
%description python
|
||||
|
@ -448,8 +449,8 @@ fi
|
|||
%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%{with_python_version}/site-packages/rpmmodule.so
|
||||
%{__prefix}/lib/python%{with_python_version}/site-packages/poptmodule.so
|
||||
%endif
|
||||
|
||||
%if %{with_perl_subpackage}
|
||||
|
@ -602,3 +603,4 @@ fi
|
|||
- sparc: make dbenv per-rpmdb, not per-dbi.
|
||||
- handle lazy db open's in chroot with absolute path, not prefix strip.
|
||||
- Depends should use CDB if configured.
|
||||
- autodetect python 1.5/2.2.
|
||||
|
|
10
rpm.spec.in
10
rpm.spec.in
|
@ -1,4 +1,5 @@
|
|||
%define with_python_subpackage @WITH_PYTHON_SUBPACKAGE@ %{nil}
|
||||
%define with_python_version @WITH_PYTHON_VERSION@ %{nil}
|
||||
%define with_perl_subpackage 1
|
||||
%define with_bzip2 @WITH_BZIP2@ %{nil}
|
||||
%define with_apidocs @WITH_APIDOCS@ %{nil}
|
||||
|
@ -45,7 +46,7 @@ BuildRequires: zlib-devel
|
|||
BuildRequires: bzip2 >= 0.9.0c-2
|
||||
%endif
|
||||
%if %{with_python_subpackage}
|
||||
BuildRequires: python-devel >= 1.5.2
|
||||
BuildRequires: python-devel >= %{with_python_version}
|
||||
%endif
|
||||
%if %{with_perl_subpackage}
|
||||
BuildRequires: perl >= 0:5.00503
|
||||
|
@ -90,7 +91,7 @@ build packages using RPM.
|
|||
Summary: Python bindings for apps which will manipulate RPM packages.
|
||||
Group: Development/Libraries
|
||||
Requires: rpm = %{rpm_version}
|
||||
Requires: python >= 1.5.2
|
||||
Requires: python >= %{with_python_version}
|
||||
Requires: popt = 1.7
|
||||
|
||||
%description python
|
||||
|
@ -448,8 +449,8 @@ fi
|
|||
%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%{with_python_version}/site-packages/rpmmodule.so
|
||||
%{__prefix}/lib/python%{with_python_version}/site-packages/poptmodule.so
|
||||
%endif
|
||||
|
||||
%if %{with_perl_subpackage}
|
||||
|
@ -602,3 +603,4 @@ fi
|
|||
- sparc: make dbenv per-rpmdb, not per-dbi.
|
||||
- handle lazy db open's in chroot with absolute path, not prefix strip.
|
||||
- Depends should use CDB if configured.
|
||||
- autodetect python 1.5/2.2.
|
||||
|
|
Loading…
Reference in New Issue