Ver Fonte

Add Python3 binary package.

Jelmer Vernooij há 10 anos atrás
pai
commit
64c5eb099d
4 ficheiros alterados com 50 adições e 12 exclusões
  1. 3 0
      .gitignore
  2. 1 0
      debian/changelog
  3. 38 1
      debian/control
  4. 8 11
      debian/rules

+ 3 - 0
.gitignore

@@ -15,3 +15,6 @@ debian/python-dulwich
 debian/*.substvars
 debian/python-dulwich-dbg
 debian/*.debhelper
+dulwich.egg-info
+debian/python3-dulwich-dbg
+debian/python3-dulwich

+ 1 - 0
debian/changelog

@@ -1,6 +1,7 @@
 dulwich (0.10.1+git20150425-1) UNRELEASED; urgency=medium
 
   * New upstream snapshot.
+  * Add Python3 binary package.
 
  -- Jelmer Vernooij <jelmer@debian.org>  Sun, 26 Apr 2015 13:08:13 +0000
 

+ 38 - 1
debian/control

@@ -4,9 +4,10 @@ Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
 Uploaders: Jelmer Vernooij <jelmer@debian.org>
 Homepage: http://samba.org/~jelmer/dulwich
-Build-Depends: python-all-dev (>= 2.6.6-3), python-all-dbg (>= 2.6.6-3), debhelper (>= 9), python-unittest2, git (>= 1:1.7.0.4-2) | git-core, python-fastimport (>= 0.9.0~bzr293), pypy-dev, dh-python
+Build-Depends: python-all-dev (>= 2.6.6-3), python-all-dbg (>= 2.6.6-3), python3-all-dev, python3-all-dbg, debhelper (>= 9), python-unittest2, git (>= 1:1.7.0.4-2) | git-core, python-fastimport (>= 0.9.0~bzr293), pypy-dev, dh-python
 Standards-Version: 3.9.6
 X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.2
 Vcs-Git: git://anonscm.debian.org/python-modules/packages/dulwich.git -b unstable
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=python-modules/packages/dulwich.git
 XS-Testsuite: autopkgtest
@@ -63,3 +64,39 @@ Description: Python Git library - pypy module
  includes the high performance versions.
  .
  This package contains the module built for pypy.
+
+Package: python3-dulwich
+Architecture: any
+Provides: ${python:Provides}
+Depends: ${python:Depends}, ${misc:Depends}, ${shlibs:Depends}
+Breaks: bzr-git (<< 0.6.2)
+Suggests: python-dulwich-dbg
+Description: Python Git library - Python3 module
+ Dulwich is a Python implementation of the file formats and protocols
+ used by the Git version control system. It can currently read from and write
+ to existing Git repositories and implements the protocol for pushing and
+ receiving packs from remote servers.
+ .
+ All functionality is available in pure Python, but for improved performance
+ replacements of some modules written in C are also available. This package
+ includes the high performance versions.
+ .
+ This package contains the module built for Python version 3.x.
+
+Package: python3-dulwich-dbg
+Architecture: any
+Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, python3-dbg, python3-dulwich (= ${binary:Version})
+Priority: extra
+Section: debug
+Provides: ${python:Provides}
+Description: Python Git library - Python 3 Debug Extension
+ Dulwich is a Python implementation of the file formats and protocols
+ used by the Git version control system. It can currently read from and write
+ to existing Git repositories and implements the protocol for pushing and
+ receiving packs from remote servers.
+ .
+ All functionality is available in pure Python, but for improved performance
+ replacements of some modules written in C are also available. This package
+ includes the high performance versions.
+ .
+ This package contains the extensions built for the Python 3 debug interpreter.

+ 8 - 11
debian/rules

@@ -5,17 +5,12 @@ CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
-# Get the supported Python versions
-PYTHONS = $(shell pyversions -r) pypy
-# Get the default Python version
-PYVERSION = $(shell pyversions -d -v)
-
 # Callable functions to determine the correct PYTHONPATH
 pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
 pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib_d.*-$(1) 2>/dev/null || ls -d $(CURDIR)/build/lib.*$(1)-pydebug)
 
 %:
-	dh $* --with python2,pypy --buildsystem=python_distutils
+	dh $* --with python2,python3,pypy --buildsystem=python_distutils
 
 override_dh_auto_build:
 	dh_auto_build
@@ -27,7 +22,8 @@ override_dh_auto_clean:
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	$(MAKE) check
+	$(MAKE) check PYTHON=python
+	$(MAKE) check PYTHON=python3
 	PYTHONPATH=$(shell echo $(CURDIR)/build-pypy/lib*) pypy -m unittest dulwich.tests.test_suite
 endif
 
@@ -36,7 +32,7 @@ override_dh_auto_install:
 	pypy setup.py build -b build-pypy install --root debian/tmp --install-layout deb
 	rm -rf debian/tmp/usr/lib/pypy/bin
 	# Install everything excluding the *_d.so debug extensions to python-dulwich
-	dh_install -X"*_d.so" "debian/tmp/usr/lib/python*/*-packages" -p python-dulwich
+	dh_install -X"*_d.so" "debian/tmp/usr/lib/python2*/*-packages" -p python-dulwich
 	# Install the debug extensions to python-dulwich-dbg
 	dh_install "debian/tmp/usr/lib/python*/*-packages/dulwich/*_d.so" -p python-dulwich-dbg
 	# Install the pypy files to pypy-dulwich
@@ -44,13 +40,14 @@ override_dh_auto_install:
 
 override_dh_installdocs:
 	dh_installdocs -ppython-dulwich-dbg --link-doc=python-dulwich
+	dh_installdocs -ppython3-dulwich-dbg --link-doc=python3-dulwich
 	dh_installdocs -ppython-dulwich docs/tutorial -X.gitignore -XMakefile
+	dh_installdocs -ppython3-dulwich docs/tutorial -X.gitignore -XMakefile
 	dh_installdocs -ppypy-dulwich docs/tutorial -X.gitignore -XMakefile
 
 override_dh_strip:
-ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
-	dh_strip --dbg-package=python-dulwich-dbg
-endif
+	dh_strip -p python-dulwich --dbg-package=python-dulwich-dbg
+	dh_strip -p python3-dulwich --dbg-package=python3-dulwich-dbg
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS