[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Bug#651962: python-argparse redundant?



tags 651962 + patch
thanks

Hello,

Sorry for the last message which was inadvertently sent...

Ritesh Raj Sarraf <rrs@debian.org> writes:

>> About #651962, I  guess that something like '<< 2.7'  should be added
>> to X-Python-Version...
>
> I tried your suggestion but it doesn't seem to work.  The build log of
> what             I             attempted            is             at:
> http://people.debian.org/~rrs/tmp/argparse_1.2.1-1_amd64.build
>
> Could you or someone else from the team help here?

Sure. I have attached a patch fixing the issue. X-Python-Version was not
enough as  you use `python  setup.py ...'  rather than  calling setup.py
with each  supported Python version  for your package  (obtained through
pyversions which parses X-Python-Version field).

Hope that helps.

Regards,
-- 
Arnaud Fontaine

diff -uNr argparse-1.2.1.orig/debian/control argparse-1.2.1/debian/control
--- argparse-1.2.1.orig/debian/control	2011-12-15 17:29:21.095663824 +0900
+++ argparse-1.2.1/debian/control	2011-12-15 17:14:09.162273948 +0900
@@ -3,10 +3,10 @@
 Section: python
 Maintainer: Ritesh Raj Sarraf <rrs@debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7), python (>= 2.6.6-3~), python-setuptools
+Build-Depends: debhelper (>= 7), python-all, python (>= 2.6.6-3~), python-setuptools
 Build-Depends-Indep: python-sphinx
 Standards-Version: 3.9.2
-X-Python-Version: >=2.4
+X-Python-Version: >= 2.4, << 2.7
 Vcs-Svn: svn://svn.debian.org/svn/python-modules/packages/argparse/trunk
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/argparse/trunk/
 Homepage: http://code.google.com/p/argparse/
diff -uNr argparse-1.2.1.orig/debian/rules argparse-1.2.1/debian/rules
--- argparse-1.2.1.orig/debian/rules	2011-12-15 17:29:21.095663824 +0900
+++ argparse-1.2.1/debian/rules	2011-12-15 17:24:29.460636895 +0900
@@ -11,9 +11,13 @@
 build-arch: build-stamp
 build-indep: build-stamp
 
+PYVERS := $(shell pyversions -rv)
+
 build-stamp:
 	dh_testdir
-	python setup.py build
+	set -e; for pyver in $(PYVERS); do \
+		python$$pyver setup.py build; \
+	done
 
 	# Generate the docs from the doc sources
 	[ ! -e doc/source ] || sphinx-build doc/source html
@@ -33,7 +37,10 @@
 	[ ! -e html ] || rm -rf html
 	[ ! -e doc.orig ] || mv doc.orig doc
 
-	python setup.py clean --all
+	set -e; for pyver in $(PYVERS); do \
+		python$$pyver setup.py clean --all; \
+	done
+
 	[ -f argparse.pyc ] && rm -f argparse.pyc
 
 	dh_clean
@@ -46,8 +53,11 @@
 
 	[ ! -e doc ] || mv doc doc.orig
 
-	python setup.py install --root $(CURDIR)/debian/python-argparse
-	
+	set -e; for pyver in $(PYVERS); do \
+		python$$pyver setup.py install --install-layout=deb \
+			--root $(CURDIR)/debian/python-argparse; \
+	done
+
 	# Remove jquery.js javascript as per policy 4.13
 	[ ! -e html/_static/jquery.js ] || rm -rf html/_static/jquery.js
 

Reply to: