[Python-modules-commits] r30557 - in packages/python-pkginfo/trunk/debian (11 files)

zyga-guest at users.alioth.debian.org zyga-guest at users.alioth.debian.org
Tue Sep 9 14:48:50 UTC 2014


    Date: Tuesday, September 9, 2014 @ 14:48:50
  Author: zyga-guest
Revision: 30557

* Team upload
* Use pybuild
* Add a patch that fixes unit tests when running on python3.4
* Add a patch that fixes pkginfo executable when using python3.4
* Add a new 'python3-pkginfo' binary package and move the main executable
  and the manual page there. This is a compromise between adding a new
  binary package (seems wasteful) and renaming all executables to have the
  interpreter version (against the python3 policy) 
* Adjust the 'python-pkginfo-doc' package to build with python3 and to
  make sense for both versions of the library

Added:
  packages/python-pkginfo/trunk/debian/patches/
  packages/python-pkginfo/trunk/debian/patches/fix-configparser-import
  packages/python-pkginfo/trunk/debian/patches/fix-tests-on-python3.4
  packages/python-pkginfo/trunk/debian/patches/series
  packages/python-pkginfo/trunk/debian/python-pkginfo-doc.docs
  packages/python-pkginfo/trunk/debian/python3-pkginfo.manpages
    (from rev 30556, packages/python-pkginfo/trunk/debian/python-pkginfo.manpages)
Modified:
  packages/python-pkginfo/trunk/debian/changelog
  packages/python-pkginfo/trunk/debian/control
  packages/python-pkginfo/trunk/debian/python-pkginfo-doc.doc-base
  packages/python-pkginfo/trunk/debian/rules
Deleted:
  packages/python-pkginfo/trunk/debian/python-pkginfo.manpages

Modified: packages/python-pkginfo/trunk/debian/changelog
===================================================================
--- packages/python-pkginfo/trunk/debian/changelog	2014-09-09 11:04:40 UTC (rev 30556)
+++ packages/python-pkginfo/trunk/debian/changelog	2014-09-09 14:48:50 UTC (rev 30557)
@@ -1,3 +1,18 @@
+python-pkginfo (1.1-2) UNRELEASED; urgency=medium
+
+  * Team upload
+  * Use pybuild
+  * Add a patch that fixes unit tests when running on python3.4
+  * Add a patch that fixes pkginfo executable when using python3.4
+  * Add a new 'python3-pkginfo' binary package and move the main executable
+    and the manual page there. This is a compromise between adding a new
+    binary package (seems wasteful) and renaming all executables to have the
+    interpreter version (against the python3 policy) 
+  * Adjust the 'python-pkginfo-doc' package to build with python3 and to
+    make sense for both versions of the library
+
+ -- Zygmunt Krynicki <zygmunt.krynicki at canonical.com>  Mon, 21 Apr 2014 14:24:48 +0200
+
 python-pkginfo (1.1-1) unstable; urgency=low
 
   [ Jakub Wilk ]

Modified: packages/python-pkginfo/trunk/debian/control
===================================================================
--- packages/python-pkginfo/trunk/debian/control	2014-09-09 11:04:40 UTC (rev 30556)
+++ packages/python-pkginfo/trunk/debian/control	2014-09-09 14:48:50 UTC (rev 30557)
@@ -4,10 +4,15 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Jan Dittberner <jandd at debian.org>
 Build-Depends: debhelper (>= 9~),
-               python (>= 2.6.5~),
+               dh-python,
+               python-all,
+               python3-all,
                python-setuptools,
-               python-sphinx (>= 1.0.7+dfsg-1~)
+               python3-setuptools,
+               python3-sphinx
 Standards-Version: 3.9.5
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.3
 Homepage: http://pypi.python.org/pypi/pkginfo/
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-pkginfo/trunk/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-pkginfo/trunk/
@@ -16,18 +21,31 @@
 Architecture: all
 Depends: python-pkg-resources, ${misc:Depends}, ${python:Depends}
 Recommends: python-pkginfo-doc (=${binary:Version})
-Description: Python module to query metadata from packages
+Description: Python 2.x module to query metadata from packages
  This package provides an API for querying the distutils metadata written in
  the PKG-INFO file inside a source distribution (an sdist), or into the
  EGG-INFO directory of an installed distribution.
+ .
+ This package contains the Python 2 version of the library
 
 Package: python-pkginfo-doc
 Architecture: all
-Section: doc
+Section: oldlibs
+Priority: extra
 Depends: ${misc:Depends}, ${sphinxdoc:Depends}
 Description: Python module to query metadata from packages documentation
  This package provides an API for querying the distutils metadata written in
  the PKG-INFO file inside a source distribution (an sdist), or into the
  EGG-INFO directory of an installed distribution.
+
+Package: python3-pkginfo
+Architecture: all
+Depends: python3-pkg-resources, ${misc:Depends}, ${python3:Depends}
+Recommends: python-pkginfo-doc (=${binary:Version})
+Description: Python 3.x module to query metadata from packages
+ This package provides an API for querying the distutils metadata written in
+ the PKG-INFO file inside a source distribution (an sdist), or into the
+ EGG-INFO directory of an installed distribution.
  .
- This package contains the documentation for python-pkginfo
+ This package contains the Python 3 version of the library
+ In addition, this package contains the 'pkginfo' executable

Added: packages/python-pkginfo/trunk/debian/patches/fix-configparser-import
===================================================================
--- packages/python-pkginfo/trunk/debian/patches/fix-configparser-import	                        (rev 0)
+++ packages/python-pkginfo/trunk/debian/patches/fix-configparser-import	2014-09-09 14:48:50 UTC (rev 30557)
@@ -0,0 +1,33 @@
+Description: Fix configparser import to work on python3
+ This patch fixes the way the ConfigParser class is imported to work
+ on both the python2.x stdlib and python3.x stdlib. 
+Author: Zygmunt Krynicki <zygmunt.krynicki at canonical.com>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- python-pkginfo-1.1.orig/pkginfo/commandline.py
++++ python-pkginfo-1.1/pkginfo/commandline.py
+@@ -16,7 +16,11 @@ o a "develop" checkout:  in ths case,  '
+ o an installed package:  in this case, 'path' should be the importable name
+   of the package.
+ """
+-from ConfigParser import ConfigParser
++import sys
++if sys.version_info[0] == 3:
++    from configparser import ConfigParser
++else:
++    from ConfigParser import ConfigParser
+ from csv import writer
+ import optparse
+ import os

Added: packages/python-pkginfo/trunk/debian/patches/fix-tests-on-python3.4
===================================================================
--- packages/python-pkginfo/trunk/debian/patches/fix-tests-on-python3.4	                        (rev 0)
+++ packages/python-pkginfo/trunk/debian/patches/fix-tests-on-python3.4	2014-09-09 14:48:50 UTC (rev 30557)
@@ -0,0 +1,28 @@
+Description: Fix tests failing on python3.4
+ This patch corrects tests that contained hard-coded check for python3.3
+ where the (presumed) intent was to just test for >= 3.3.
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- python-pkginfo-1.1.orig/pkginfo/tests/test_installed.py
++++ python-pkginfo-1.1/pkginfo/tests/test_installed.py
+@@ -41,7 +41,7 @@ class InstalledTests(unittest.TestCase):
+         installed = self._makeOne(wsgiref)
+         self.assertEqual(installed.package, wsgiref)
+         self.assertEqual(installed.package_name, 'wsgiref')
+-        if sys.version_info[:2] == (3, 3):
++        if sys.version_info[:2] >= (3, 3):
+             self.assertEqual(installed.metadata_version, None)
+         else:
+             self.assertEqual(installed.metadata_version, '1.0')

Added: packages/python-pkginfo/trunk/debian/patches/series
===================================================================
--- packages/python-pkginfo/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-pkginfo/trunk/debian/patches/series	2014-09-09 14:48:50 UTC (rev 30557)
@@ -0,0 +1,2 @@
+fix-tests-on-python3.4
+fix-configparser-import

Modified: packages/python-pkginfo/trunk/debian/python-pkginfo-doc.doc-base
===================================================================
--- packages/python-pkginfo/trunk/debian/python-pkginfo-doc.doc-base	2014-09-09 11:04:40 UTC (rev 30556)
+++ packages/python-pkginfo/trunk/debian/python-pkginfo-doc.doc-base	2014-09-09 14:48:50 UTC (rev 30557)
@@ -1,5 +1,5 @@
 Document: python-pkginfo
-Title: pkginfo - Python module to query metadata from packages
+Title: pkginfo - Python 2/3 module to query metadata from packages
 Author: Tres Seaver
 Abstract: pkginfo provides an API for querying the distutils metadata written
  in the PKG-INFO file inside a source distribution (an sdist), or into the

Added: packages/python-pkginfo/trunk/debian/python-pkginfo-doc.docs
===================================================================
--- packages/python-pkginfo/trunk/debian/python-pkginfo-doc.docs	                        (rev 0)
+++ packages/python-pkginfo/trunk/debian/python-pkginfo-doc.docs	2014-09-09 14:48:50 UTC (rev 30557)
@@ -0,0 +1 @@
+build/sphinx/html

Deleted: packages/python-pkginfo/trunk/debian/python-pkginfo.manpages
===================================================================
--- packages/python-pkginfo/trunk/debian/python-pkginfo.manpages	2014-09-09 11:04:40 UTC (rev 30556)
+++ packages/python-pkginfo/trunk/debian/python-pkginfo.manpages	2014-09-09 14:48:50 UTC (rev 30557)
@@ -1 +0,0 @@
-debian/pkginfo.1

Copied: packages/python-pkginfo/trunk/debian/python3-pkginfo.manpages (from rev 30556, packages/python-pkginfo/trunk/debian/python-pkginfo.manpages)
===================================================================
--- packages/python-pkginfo/trunk/debian/python3-pkginfo.manpages	                        (rev 0)
+++ packages/python-pkginfo/trunk/debian/python3-pkginfo.manpages	2014-09-09 14:48:50 UTC (rev 30557)
@@ -0,0 +1 @@
+debian/pkginfo.1

Modified: packages/python-pkginfo/trunk/debian/rules
===================================================================
--- packages/python-pkginfo/trunk/debian/rules	2014-09-09 11:04:40 UTC (rev 30556)
+++ packages/python-pkginfo/trunk/debian/rules	2014-09-09 14:48:50 UTC (rev 30557)
@@ -1,19 +1,15 @@
 #!/usr/bin/make -f
+export PYBUILD_NAME=pkginfo
+# Let's ship pkginfo executable only in the python3 version of the package
+export PYBUILD_AFTER_INSTALL_python2=rm -f {destdir}/usr/bin/pkginfo && find {destdir} -type d -empty -delete
 
-override_dh_auto_install:
-	PYTHONPATH=$(CURDIR) sphinx-build -b html -a -c docs docs \
-	    $(CURDIR)/debian/python-pkginfo-doc/usr/share/doc/python-pkginfo-doc/html
-	python setup.py install --install-layout=deb \
-	    --root $(CURDIR)/debian/python-pkginfo
- 
-override_dh_python2:
-	dh_python2 -ppython-pkginfo
+%:
+	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
 
-override_dh_sphinxdoc:
-	dh_sphinxdoc -ppython-pkginfo-doc
 
-override_dh_compress:
-	dh_compress -i -X.rst -X.js -X.html -X.txt -X.py
+override_dh_auto_build:
+	dh_auto_build --buildsystem=pybuild
+	python3 setup.py build_sphinx
 
 override_dh_clean:
 	rm -rf *.egg-info pkginfo/tests/sneaky/src/namespaced.sneaky.egg-info
@@ -24,7 +20,6 @@
 	set -e -x; \
 	cd pkginfo/tests/sneaky ; python setup.py egg_info ; cd ../../.. ; \
 	PYTHONPATH=$(CURDIR)/build/lib.* python setup.py test
+	cd pkginfo/tests/sneaky ; python3 setup.py egg_info ; cd ../../.. ; \
+	PYTHONPATH=$(CURDIR)/build/lib.* python3 setup.py test
 endif
-
-%:
-	dh $@ --with python2,sphinxdoc --buildsystem=python_distutils




More information about the Python-modules-commits mailing list