[Python-modules-team] Bug#616858: libapache2-mod-python: Patch to switch to dh_python2, and other fixes.

Barry Warsaw barry at python.org
Wed Jul 20 20:18:36 UTC 2011


Package: libapache2-mod-python
Version: 3.3.1-9
Followup-For: Bug #616858
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

As the bug report states, python-central is officially deprecated.  This patch
completes the switch, and also fixes a problem with the ./configure line.
configure does not accept --with-python-version but it does have a
- --with-python option which takes the Python binary name (e.g. python2.7).
This is why I changed PYVER to use `pyversions -r`.

Also note that with the current rules file mod_python does not seem to be
buildable with more than one version of Python, so in converting to
dh_python2, I set X-Python-Version: >= 2.7.  Since Python 2.6 is the default
in Debian you'll probably want to change this (Python 2.7 is default in
Ubuntu, which is where I am going to upload this change).

I'm eager to hear back from you!  I hope you will consider this patch.

Thanks.


*** /tmp/tmpNLMMih
In Ubuntu, the attached patch was applied to achieve the following:


  * Switch to dh_python2.  (LP: #788514)


Thanks for considering the patch.


- -- System Information:
Debian Release: wheezy/sid
  APT prefers oneiric-updates
  APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric'), (100, 'oneiric-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-5-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOJzgcAAoJEBJutWOnSwa/XlgQAJj2PIuHrLkinex21g/OfSZ9
yCFy/BxJhKPFXirunNH0ZlIrHVQEqY5GMUYlQLpVnSc54MOZmKvm0/0P0U62GFi1
cmoBBwsKrScUNDa3aLRQh4qPCDmxaHN8xRhznmUPRSv3alrRruscO3KDmu1Q5cIZ
LwAgqSNqVXUIU4V0BqaGnLuGlBF+oBfZ03ph2J5g/j1uDy2BtcshIOgBHMOmSyGU
ow0KRhxS1mXQIR2YbgVhQ0PYXwuo6IvdCpJ5dgLekSvAqo+HA/2ZrDBMbyWyInKf
y7XHAjcW4CTc2oyg0SOf2Isl+Zu9xnOThXwQpCs0cyUOTlqX5VkWv8XRUaTEdrVA
qAcT7tRgIA9brnxz2vUcNHsWKYBZnQ2e+RgkuyQXs2EMi+sUU599Qaj8J33AEG51
4AGFck/xaBsuNY0SNeOXXPFS+g9d/toIacm7ShzyyNg8JbNlXXKOfM2ZODQYuYZV
g9kfEb8NkKMAGkMYFQr3eitfjtp0RUqzftjreg9Br/+uMpWLoyBehcT9a6S25uky
RmEovu7AyMqZrkEvz71fKa+Wn+8KLqBiPlKZFsewA71mHInch7eoXJsyI0OfbqBv
SK4zeaiDRi4aQ+m/jn4J3chUelFqBqhhR60QhY5xfqbq5erB9xbxnjv5sVBKvkPi
AnJPH4IUFfMNIOMW9FFx
=K9Qh
-----END PGP SIGNATURE-----
-------------- next part --------------
=== modified file 'debian/changelog'

=== modified file 'debian/control'
--- debian/control	2010-03-27 14:41:02 +0000
+++ debian/control	2011-07-20 19:47:36 +0000
@@ -3,13 +3,13 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Robert S. Edmonds <edmonds at debian.org>
-Build-Depends: debhelper (>= 5.0.38), autoconf, python-dev (>= 2.4.3-11),
- apache2-threaded-dev (>= 2.2.3-1), dpatch, python-central (>= 0.5.6)
-XS-Python-Version: current
+Build-Depends: debhelper (>= 5.0.38), autoconf, python-dev (>= 2.6.6-3~),
+ apache2-threaded-dev (>= 2.2.3-1), dpatch,
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/libapache2-mod-python/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/libapache2-mod-python/trunk/
 Homepage: http://www.modpython.org/
-Standards-Version: 3.8.4
+Standards-Version: 3.9.2
+X-Python-Version: >= 2.7
  
 Package: libapache2-mod-python
 Architecture: any
@@ -19,7 +19,6 @@
 Replaces: libapache2-mod-python2.4 (<< 3.2.8-3), libapache2-mod-python2.3 (<< 3.2.8-3)
 Conflicts: libapache2-mod-python2.4, libapache2-mod-python2.3, libapache2-mod-python2.2,
  libapache-mod-python, libapache-mod-python2.1, libapache-mod-python2.2, libapache-mod-python2.3
-XB-Python-Version: ${python:Versions}
 Description: Python-embedding module for Apache 2
  The mod_python module supports web applications written in Python.
  Because the parser is embedded in the server as an Apache module, it

=== modified file 'debian/rules'
--- debian/rules	2010-03-27 14:41:02 +0000
+++ debian/rules	2011-07-20 19:47:10 +0000
@@ -8,7 +8,7 @@
 
 include /usr/share/dpatch/dpatch.make
 
-PYVER=$(shell pyversions -rv)
+PYVER=$(shell pyversions -r)
 
 configure: configure-stamp
 configure-stamp:
@@ -57,7 +57,7 @@
 	-env PYTHON_BIN=/usr/bin/python \
 	./configure --with-apxs=/usr/bin/apxs2 --prefix=/usr \
 		--mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
-		--with-python-version=$(PYVER)
+		--with-python=$(PYVER)
 	$(MAKE) clean && DEB_DEFINES="-DLONG_LONG=PY_LONG_LONG" $(MAKE)
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/libapache2-mod-python
 	cp debian/python.load debian/libapache2-mod-python/etc/apache2/mods-available/
@@ -83,7 +83,7 @@
 binary-arch: build install
 	dh_testdir -a
 	dh_testroot -a
-	dh_pycentral -plibapache2-mod-python
+	dh_python2 -plibapache2-mod-python
 	dh_installdocs -a
 	dh_installexamples -a
 	dh_installmenu -a



More information about the Python-modules-team mailing list