I've included a patch to make a pyton2.3-rpm package. It builds and installs locally. A script happily loads the module, but I haven't tested any rpm operations yet.
I don't know how much of a problem it is not having a python2.1-rpm or python2.2-rpm packages is. -- David Pashley [EMAIL PROTECTED] Nihil curo de ista tua stulta superstitione.
diff -u rpm-4.0.4/configure.in rpm-4.0.4/configure.in --- rpm-4.0.4/configure.in +++ rpm-4.0.4/configure.in @@ -819,33 +819,44 @@ AC_ARG_WITH(python, [ --with-python build rpm python bindings ]) WITH_PYTHON_VERSION= -if test $withval = auto ; then +if test $withval = yes ; then - AC_MSG_CHECKING(for python 2.2) + AC_MSG_CHECKING(for python 2.3) AC_TRY_RUN([ -#include <python2.2/Python.h> +#include <python2.3/Python.h> main() { - exit(strncmp("2.2", PY_VERSION, 3)); + exit(strncmp("2.3", 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) + WITH_PYTHON_VERSION="2.3" + else + AC_MSG_CHECKING(for python 2.2) AC_TRY_RUN([ -#include <python1.5/Python.h> +#include <python2.2/Python.h> main() { - exit(strcmp("1.5.2", PY_VERSION)); + 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="1.5" + 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) + if test $withval = yes ; then + WITH_PYTHON_VERSION="1.5" + fi fi fi - fi if test -n "$WITH_PYTHON_VERSION" ; then diff -u rpm-4.0.4/debian/control rpm-4.0.4/debian/control --- rpm-4.0.4/debian/control +++ rpm-4.0.4/debian/control @@ -1,7 +1,7 @@ Source: rpm Section: admin Priority: optional -Build-Depends: debhelper (>= 4.1.28), libtool, autoconf, automake1.7, zlib1g-dev, libbz2-dev, libdb3-dev, gettext, dpkg-dev (>= 1.9.0), libpopt-dev (>= 1.6.4) +Build-Depends: debhelper (>= 4.1.28), libtool, autoconf, automake1.7, zlib1g-dev, libbz2-dev, libdb3-dev, gettext, dpkg-dev (>= 1.9.0), libpopt-dev (>= 1.6.4), python2.3-dev Maintainer: Anibal Monsalve Salazar <[EMAIL PROTECTED]> Uploaders: Víctor Pérez Pereira <[EMAIL PROTECTED]> Standards-Version: 3.6.1 @@ -53,0 +54,12 @@ + +Package: python2.3-rpm +Architecture: any +Section: python +Priority: extra +Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends} +Description: Python bindings for RPM + This library allows programs to make use of a rpm database or rpm packages + without going through the rpm program. + . + This package includes the python bindings for rpm allowing you to use rpm + from python scripts diff -u rpm-4.0.4/debian/changelog rpm-4.0.4/debian/changelog --- rpm-4.0.4/debian/changelog +++ rpm-4.0.4/debian/changelog @@ -1,3 +1,9 @@ +rpm (4.0.4-32) unstable; urgency=low + + * Enabled python bindings + + -- David Pashley <[EMAIL PROTECTED]> Fri, 2 Sep 2005 10:03:19 +0100 + rpm (4.0.4-31) unstable; urgency=low * Scott James Remnant <[EMAIL PROTECTED]> diff -u rpm-4.0.4/debian/rules rpm-4.0.4/debian/rules --- rpm-4.0.4/debian/rules +++ rpm-4.0.4/debian/rules @@ -9,7 +9,7 @@ libtoolize --copy --force automake-1.7 -i -a -c -f autoconf - ./configure --prefix=/usr --mandir=/usr/share/man --enable-shared + ./configure --prefix=/usr --mandir=/usr/share/man --enable-shared --with-python touch makefiles build: build-stamp @@ -88,6 +88,7 @@ dh_installmenu dh_installcron dh_installchangelogs -k CHANGES + dh_python dh_strip dh_compress # Remember to update after upstream releases. The whole soname is only in patch2: unchanged: --- rpm-4.0.4.orig/debian/python2.3-rpm.install +++ rpm-4.0.4/debian/python2.3-rpm.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/python2.3/