Bug#616858: libapache2-mod-python: Patch to switch to dh_python2, and other fixes.

July 20th, 2011 - 04:30 pm ET by Barry Warsaw | Report spam
This is a multi-part MIME message sent by reportbug.


MIME-Version: 1.0

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

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
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.


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


MIME-Version: 1.0

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@lists.alioth.debian.org>
Uploaders: Robert S. Edmonds <edmonds@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...hon/trunk/
Vcs-Browser: http://svn.debian.org/viewsvn/pytho...hon/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 \
+ --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





To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 3 repliesReplies Make a reply

Similar topics

Replies

#1 Jakub Wilk
July 20th, 2011 - 05:10 pm ET | Report spam
* Barry Warsaw , 2011-07-20, 16:18:
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.



Err, no, whatever you wanted to achieve, this is wrong.

Jakub Wilk



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#2 Barry Warsaw
July 27th, 2011 - 03:40 pm ET | Report spam

On Jul 20, 2011, at 11:05 PM, Jakub Wilk wrote:

* Barry Warsaw , 2011-07-20, 16:18:
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.



Err, no, whatever you wanted to achieve, this is wrong.



The problem is that the package used to be doing

./configure --with-python-version 2.7

(admittedly, on Ubuntu, sorry ;)

but that does not work because the configure script does not recognize
wants to be


But note also that --with-python does not accept a list of Python binaries,
and afaict, the rules file does not loop over multiple Python versions. This
essentially mans libapache2-mod-python can only be built for one version of
Python (well, without more radical changes to debian/rules).

Maybe it's better to not include an X-Python-Version header and use

PYVER=$(shell pyversions -d)

instead?

Cheers,
-Barry






To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#3 Barry Warsaw
July 27th, 2011 - 04:00 pm ET | Report spam

On Jul 20, 2011, at 05:16 PM, Barry Warsaw wrote:

Maybe it's better to not include an X-Python-Version header and use

PYVER=$(shell pyversions -d)

instead?



Close. If you remove the X-Python-Version header, you need to add

Cheers,
-Barry






To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search