r2379 - in zope2.12/trunk/debian (3 files)

mejo at users.alioth.debian.org mejo at users.alioth.debian.org
Thu Oct 6 22:44:43 UTC 2011


    Date: Thursday, October 6, 2011 @ 22:44:42
  Author: mejo
Revision: 2379

make python version configurable in build process; really switch to dh_python2

Modified:
  zope2.12/trunk/debian/changelog
  zope2.12/trunk/debian/python_interpreter_template.in
  zope2.12/trunk/debian/rules

Modified: zope2.12/trunk/debian/changelog
===================================================================
--- zope2.12/trunk/debian/changelog	2011-10-06 19:33:48 UTC (rev 2378)
+++ zope2.12/trunk/debian/changelog	2011-10-06 22:44:42 UTC (rev 2379)
@@ -39,13 +39,15 @@
     - Bump build-depends on python-dev and depends on python to (>= 2.6.6-3~).
     - Remove build-depends on python, as python-dev build-depends pull it in.
     - Remove debian/pyversions, add X-Python-Version: 2.6 to debian/control.
+    - Add --with python2 to dh in debian/rules, to invoke dh_python2.
   * Update watchfile to search for Zope2.12 releases at pypi.python.org. 
   * Remove obsolete debian/zopeZVER.preinst.in magic, not needed anymore. 
+  * Add $(PYTHON) variable in debian/rules to make python version configurable.
 
   TODO:
   * Bump (build-)depends on python-pkg-resources to >= 0.6.17 once in the archive
 
- -- Jonas Meurer <mejo at debian.org>  Thu, 06 Oct 2011 21:32:06 +0200
+ -- Jonas Meurer <mejo at debian.org>  Fri, 07 Oct 2011 00:43:36 +0200
 
 zope2.12 (2.12.11-1) unstable; urgency=low
 

Modified: zope2.12/trunk/debian/python_interpreter_template.in
===================================================================
--- zope2.12/trunk/debian/python_interpreter_template.in	2011-10-06 19:33:48 UTC (rev 2378)
+++ zope2.12/trunk/debian/python_interpreter_template.in	2011-10-06 22:44:42 UTC (rev 2379)
@@ -12,4 +12,4 @@
 	export PYTHONPATH="$PYTHONPATH:${INSTANCE_HOME}/lib/python"
 fi
 
-/usr/bin/python2.6 "$@"
+/usr/bin/python at PYVER@ "$@"

Modified: zope2.12/trunk/debian/rules
===================================================================
--- zope2.12/trunk/debian/rules	2011-10-06 19:33:48 UTC (rev 2378)
+++ zope2.12/trunk/debian/rules	2011-10-06 22:44:42 UTC (rev 2379)
@@ -10,6 +10,8 @@
 
 ZVER:=2.12
 ZOPE:=zope$(ZVER)
+PYVER:=2.6
+PYTHON:=python$(PYVER)
 DEBIAN:=$(CURDIR)/debian
 DEB_SATISFIED:=ClientForm:Docutils:distribute:mechanize:pip:pytz
 distribution:=$(shell lsb_release -is)
@@ -24,7 +26,7 @@
 	rm -rf $(CURDIR)/$(SRC_DIR)
 	mkdir $(CURDIR)/$(SRC_DIR)
 	cd $(CURDIR)/$(SRC_DIR); \
-	python2.6 $(DEBIAN)/build-scripts/fetch.py \
+	$(PYTHON) $(DEBIAN)/build-scripts/fetch.py \
 		--versions-cfg-url=${ZOPE_INDEX}$(SRC_VERSION)/versions.cfg \
 		--index=${ZOPE_INDEX}$(SRC_VERSION) \
 		--exclude-singles=$(DEB_SATISFIED) \
@@ -33,7 +35,7 @@
 	rm -rf $(CURDIR)/$(SRC_DIR)
 
 %:
-	dh $@ 
+	dh --with python2 $@ 
 
 override_dh_auto_clean:
 	for f in debian/*.in; do \
@@ -48,13 +50,13 @@
 	./configure --prefix=/usr/lib/${ZOPE}
 
 override_dh_auto_build:
-	make PYTHON=python2.6 \
+	make PYTHON=$(PYTHON) \
 	     DIST_EXCLUSIONS=$(DEB_SATISFIED)
 
 override_dh_prep:
 	for f in debian/*.in; do \
 		generated=`echo $$f | sed 's,.in$$,,;s,ZVER,$(ZVER),'`; \
-		sed 's, at ZVER@,$(ZVER),g' $$f > $$generated.tmp; \
+		sed -e 's, at ZVER@,$(ZVER),g' -e 's, at PYVER@,$(PYVER),g' $$f > $$generated.tmp; \
 		if cmp --quiet "$$generated" "$$generated.tmp"; then \
 			rm -f $$generated.tmp; \
 		else \
@@ -65,7 +67,7 @@
 	dh_installzopeinstance -pzope$(ZVER)-sandbox sandbox
 
 override_dh_auto_install:
-	make install PYTHON=python2.6 DESTDIR=$(DEBIAN)/$(ZOPE)
+	make install PYTHON=$(PYTHON) DESTDIR=$(DEBIAN)/$(ZOPE)
 
 #	sed -i '/^#!.*$$/a\import site; site.addsitedir("/usr/lib/$(ZOPE)/lib/python")' $$(find $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/bin -type f ! -type l)
 	for i in `find $(DEBIAN)/$(ZOPE) -type f`; do \




More information about the pkg-zope-developers mailing list