Hi, I have tried the attached patch to this bug, and it wasn't enough to bring python 3 support. So I did the work, and it seems much better now.
I tried to not modify the package too much, but there was really some obsolescence to address. Because I don't believe my changes are controversial, because this bug has been opened for a way too long, and because the package is team maintained, I have uploaded the package to the delayed queue (7 days). If you oppose to the attached changes (debdiff attached), please let me know and I will dcut the package from the delayed queue. Otherwise, please apply the changes to the Git (note: I don't have write access to the DPMT git, so I can't do it myself). Cheers, Thomas Goirand (zigo)
diff -Nru python-git-1.0.1+git137-gc8b8379/debian/changelog python-git-1.0.1+git137-gc8b8379/debian/changelog --- python-git-1.0.1+git137-gc8b8379/debian/changelog 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/changelog 2016-01-05 13:12:20.000000000 +0000 @@ -1,3 +1,19 @@ +python-git (1.0.1+git137-gc8b8379-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add python 3 support (Closes: #774903): + - Applied patch from the BTS. + - Added --with python3 in debian/rules. + - Added override_dh_auto_install to also install in Py3. + * Using a separate package for -doc, now using override_dh_sphinxdoc and + generating the html docs properly with sphinx-build. + * Uncommented rm -rf build in auto_clean to allow double builds. + * Bumped compat level to 7 (as lintian is not happy...). + * Removed X-Python-Version: >= 2.7 (as even old-stable has 2.7 by default) + and removed obsolete debian/pycompat file. + + -- Thomas Goirand <z...@debian.org> Tue, 05 Jan 2016 11:07:29 +0000 + python-git (1.0.1+git137-gc8b8379-2) unstable; urgency=medium [ SVN-Git Migration ] diff -Nru python-git-1.0.1+git137-gc8b8379/debian/compat python-git-1.0.1+git137-gc8b8379/debian/compat --- python-git-1.0.1+git137-gc8b8379/debian/compat 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/compat 2016-01-05 13:08:54.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru python-git-1.0.1+git137-gc8b8379/debian/control python-git-1.0.1+git137-gc8b8379/debian/control --- python-git-1.0.1+git137-gc8b8379/debian/control 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/control 2016-01-05 13:10:36.000000000 +0000 @@ -3,28 +3,65 @@ Priority: optional Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Uploaders: Vincent Bernat <ber...@debian.org>, - TANIGUCHI Takaki <tak...@debian.org> -Build-Depends: debhelper (>= 7.0.50~), python, python-setuptools (>= 0.6a9), - python-sphinx, - python-nose, python-smmap (>= 0.8.3~), python-gitdb (>= 0.6.4), python-mock, - git, + TANIGUCHI Takaki <tak...@debian.org>, +Build-Depends: debhelper (>= 9), + dh-python, + git, + python-all, + python-setuptools, + python-sphinx, + python3-all, + python3-setuptools, +Build-Depends-Indep: python-gitdb (>= 0.6.4), + python-mock, + python-nose, + python-smmap (>= 0.8.3~), + python3-gitdb (>= 0.6.4), + python3-mock, + python3-nose, + python3-smmap (>= 0.8.3~), Standards-Version: 3.9.6 -Homepage: https://github.com/gitpython-developers/GitPython -X-Python-Version: >= 2.7 Vcs-Git: git://anonscm.debian.org/python-modules/packages/python-git.git Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/python-git.git +Homepage: https://github.com/gitpython-developers/GitPython Package: python-git Architecture: all -Depends: ${python:Depends}, - git (>= 1:1.7) | git-core (>= 1:1.5.3.7), - ${misc:Depends}, - libjs-jquery, - python-gitdb (>= 0.6.4) -Suggests: - python-smmap -Description: Python library to interact with Git repositories +Depends: git (>= 1:1.7) | git-core (>= 1:1.5.3.7), + python-gitdb (>= 0.6.4), + ${misc:Depends}, + ${python:Depends}, +Suggests: python-smmap, +XB-Python-Version: ${python:Versions} +Description: Python library to interact with Git repositories - Python 2.7 python-git provides object model access to a Git repository, so Python can be used to manipulate it. Repository objects can be opened or created, which can then be traversed to find parent commit(s), trees, blobs, etc. -XB-Python-Version: ${python:Versions} + . + This package provides the Python 2.7 module. + +Package: python3-git +Architecture: all +Depends: git (>= 1:1.7) | git-core (>= 1:1.5.3.7), + python3-gitdb (>= 0.6.4), + ${misc:Depends}, + ${python3:Depends}, +XB-Python-Version: ${python3:Versions} +Description: Python library to interact with Git repositories - Python 3.x + python-git provides object model access to a Git repository, so Python can be + used to manipulate it. Repository objects can be opened or created, which can + then be traversed to find parent commit(s), trees, blobs, etc. + . + This package provides the Python 3.x module. + +Package: python-git-doc +Section: doc +Architecture: all +Depends: ${misc:Depends}, + ${sphinxdoc:Depends}, +Description: Python library to interact with Git repositories - docs + python-git provides object model access to a Git repository, so Python can be + used to manipulate it. Repository objects can be opened or created, which can + then be traversed to find parent commit(s), trees, blobs, etc. + . + This package provides the documentation. diff -Nru python-git-1.0.1+git137-gc8b8379/debian/copyright python-git-1.0.1+git137-gc8b8379/debian/copyright --- python-git-1.0.1+git137-gc8b8379/debian/copyright 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/copyright 2016-01-05 13:04:57.000000000 +0000 @@ -4,7 +4,7 @@ Source: https://github.com/gitpython-developers/GitPython Files: * -Copyright: +Copyright: 2008-2011 Michael Trier <mtr...@gmail.com> 2008-2011 Florian Apolloner <flor...@apolloner.eu> 2008-2011 David Aguilar <dav...@gmail.com> @@ -12,36 +12,35 @@ License: BSD-3-clause Files: debian/* -Copyright: +Copyright: 2008-2010 Daniel Watkins <dan...@daniel-watkins.co.uk> 2011 Andreas Noteng <andr...@noteng.no> License: BSD-3-clause License: BSD-3-clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: . - * Redistributions of source code must retain the above copyright + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . - * Neither the name of the GitPython project nor the names of - its contributors may be used to endorse or promote products derived + * Neither the name of the GitPython project nor the names of + its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff -Nru python-git-1.0.1+git137-gc8b8379/debian/doc-base python-git-1.0.1+git137-gc8b8379/debian/doc-base --- python-git-1.0.1+git137-gc8b8379/debian/doc-base 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/doc-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#Document: python-git -#Title: GitPython (python-git) documentation -#Abstract: This manual contains information on how to use the GitPython -# Python module -#Section: Programming/Python -# -#Format: HTML -#Index: /usr/share/doc/python-git/index.html -#Files: /usr/share/doc/python-git/*.html diff -Nru python-git-1.0.1+git137-gc8b8379/debian/docs python-git-1.0.1+git137-gc8b8379/debian/docs --- python-git-1.0.1+git137-gc8b8379/debian/docs 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/docs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -doc/* -AUTHORS -CHANGES diff -Nru python-git-1.0.1+git137-gc8b8379/debian/pycompat python-git-1.0.1+git137-gc8b8379/debian/pycompat --- python-git-1.0.1+git137-gc8b8379/debian/pycompat 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/pycompat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -2 diff -Nru python-git-1.0.1+git137-gc8b8379/debian/python-git-doc.doc-base python-git-1.0.1+git137-gc8b8379/debian/python-git-doc.doc-base --- python-git-1.0.1+git137-gc8b8379/debian/python-git-doc.doc-base 1970-01-01 00:00:00.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/python-git-doc.doc-base 2016-01-05 12:59:39.000000000 +0000 @@ -0,0 +1,8 @@ +Document: python-git-doc +Title: GitPython (python-git) documentation +Abstract: How to use the GitPython Python module +Section: Programming/Python + +Format: HTML +Index: /usr/share/doc/python-git-doc/html/index.html +Files: /usr/share/doc/python-git-doc/html/*.html diff -Nru python-git-1.0.1+git137-gc8b8379/debian/rules python-git-1.0.1+git137-gc8b8379/debian/rules --- python-git-1.0.1+git137-gc8b8379/debian/rules 2015-11-29 08:17:54.000000000 +0000 +++ python-git-1.0.1+git137-gc8b8379/debian/rules 2016-01-05 13:07:24.000000000 +0000 @@ -1,13 +1,30 @@ #!/usr/bin/make -f # -*- makefile -*- -export HOME=$(CURDIR)/build/test +PYTHONS:=$(shell pyversions -vr) +PYTHON3S:=$(shell py3versions -vr) -override_dh_installdocs: - dh_installdocs -Xjquery.js -X_sources +export HOME=$(CURDIR)/build/test %: - dh $@ --with python2 + dh $@ --with python2,python3,sphinxdoc + +override_dh_sphinxdoc: +ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) + PYTHONPATH=. sphinx-build -b html doc/source debian/python-git-doc/usr/share/doc/python-git-doc/html + dh_sphinxdoc +endif + +override_dh_auto_install: + set -e ; for pyvers in $(PYTHONS); do \ + python$$pyvers setup.py install --install-layout=deb \ + --root $(CURDIR)/debian/python-git ; \ + done + set -e ; for pyvers in $(PYTHON3S); do \ + python$$pyvers setup.py install --install-layout=deb \ + --root $(CURDIR)/debian/python3-git ; \ + done + rm -f $(CURDIR)/debian/python*/usr/lib/python*/dist-packages/*.pth #override_dh_auto_test: # : # run tests only if we can fetch original sources repository @@ -21,10 +38,9 @@ # GIT_PYTHON_TEST_GIT_REPO_BASE=$(CURDIR)/build/test/GitPython \ # nosetests -s -v git/test -#override_dh_auto_clean: -# dh_auto_clean -# rm -f lib/GitPython.egg-info/SOURCES.txt -# rm -rf build +override_dh_auto_clean: + dh_auto_clean + rm -rf build DOC_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p' | sed 's/~.*//') UPSTREAM=$(shell dpkg-parsechangelog | sed -nr 's/Version: (.*)-[^-]*/\1/p')
_______________________________________________ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team