[Python-modules-commits] [pysvn] 01/01: * Update to build python3-svn for all supported python3 versions (Closes: #862423)

Scott Kitterman kitterman at moszumanska.debian.org
Mon Jul 3 04:47:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

kitterman pushed a commit to branch master
in repository pysvn.

commit ba541dc1cf1f2245fe9a0a11ec96a36d144c682f
Author: Scott Kitterman <scott at kitterman.com>
Date:   Mon Jul 3 00:47:40 2017 -0400

    * Update to build python3-svn for all supported python3 versions (Closes: #862423)
---
 debian/changelog           |  8 ++++++++
 debian/python3-svn.install |  3 +--
 debian/rules               | 46 +++++++++++++++++++++++++++++-----------------
 3 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9ffc603..056d798 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pysvn (1.9.4-3) unstable; urgency=medium
+
+  * Team upload.
+  * Update to build python3-svn for all supported python3 versions
+    (Closes: #862423)
+
+ -- Scott Kitterman <scott at kitterman.com>  Sat, 01 Jul 2017 13:14:54 -0400
+
 pysvn (1.9.4-2) unstable; urgency=medium
 
   * Adds patch 0001-fix-multiple-arch-support.patch to support
diff --git a/debian/python3-svn.install b/debian/python3-svn.install
index acade8e..fc3edaf 100644
--- a/debian/python3-svn.install
+++ b/debian/python3-svn.install
@@ -1,2 +1 @@
-Source/pysvn/python3/__init__.py	usr/lib/python3/dist-packages/pysvn/
-Source/pysvn/python3/_pysvn_3*.so	usr/lib/python3/dist-packages/pysvn/
+Source/pysvn/python3/*	usr/lib/
diff --git a/debian/rules b/debian/rules
index 9743a12..2b96c29 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
 DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 PYVERS	:= $(shell pyversions -vr debian/control)
-PY3VERS := $(shell py3versions -vr debian/control)
+PY3VERS := $(shell py3versions -vr debian/control) 
 APR_INC	= $(strip $(shell apr-config --includes | sed 's/-I//'))
 
 
@@ -22,14 +22,6 @@ CONFIG_OPTS = --pycxx-src-dir=/usr/share/python${PYVERS}/CXX \
               --norpath \
               --platform=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
-CONFIG3_OPTS = --pycxx-src-dir=/usr/share/python${PY3VERS}/CXX \
-	      --pycxx-dir=/usr/include/python${PY3VERS} \
-	      --svn-lib-dir=/usr/lib/$(DEB_HOST_MULTIARCH) \
-              --apr-inc-dir=$(APR_INC) \
-              --apu-inc-dir=$(APR_INC) \
-	      --apr-lib-dir=/usr/lib/$(DEB_HOST_MULTIARCH) \
-              --norpath \
-              --platform=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
 %:
 	dh $@ --with=python2,python3 --buildsystem=pybuild
@@ -37,8 +29,19 @@ CONFIG3_OPTS = --pycxx-src-dir=/usr/share/python${PY3VERS}/CXX \
 override_dh_auto_configure:
 	cd $(CURDIR)/Source; python setup.py configure $(CONFIG_OPTS)
 	mv $(CURDIR)/Source/Makefile $(CURDIR)/Source/MakefilePy2
-	cd $(CURDIR)/Source; python3 setup.py configure $(CONFIG3_OPTS)
-	mv $(CURDIR)/Source/Makefile $(CURDIR)/Source/MakefilePy3
+	set -e && for i in $(PY3VERS); do \
+		cd $(CURDIR)/Source; python$$i setup.py configure \
+		  --pycxx-src-dir=/usr/share/python$$i/CXX \
+	          --pycxx-dir=/usr/include/python$$i \
+	          --svn-lib-dir=/usr/lib/$(DEB_HOST_MULTIARCH) \
+                  --apr-inc-dir=$(APR_INC) \
+                  --apu-inc-dir=$(APR_INC) \
+	          --apr-lib-dir=/usr/lib/$(DEB_HOST_MULTIARCH) \
+                  --norpath \
+	          --fixed-module-name \
+                  --platform=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS) ; \
+	    mv $(CURDIR)/Source/Makefile $(CURDIR)/Source/MakefilePy$$i ; \
+	done
 
 
 override_dh_auto_build:
@@ -50,15 +53,24 @@ override_dh_auto_build:
 	mv $(CURDIR)/Source/pysvn/_pysvn_2_*.so $(CURDIR)/Source/pysvn/python2/
 	$(MAKE) clean -C $(CURDIR)/Source
 
-	mkdir $(CURDIR)/Source/pysvn/python3
-	mv $(CURDIR)/Source/MakefilePy3 $(CURDIR)/Source/Makefile
-	$(MAKE) -C $(CURDIR)/Source
+	set -e && for i in $(PY3VERS); do \
+		mkdir -p $(CURDIR)/Source/pysvn/python3/python$$i/dist-packages/pysvn ; \
+		mv $(CURDIR)/Source/MakefilePy$$i $(CURDIR)/Source/Makefile ; \
+		$(MAKE) -C $(CURDIR)/Source ; \
+		\
+		mv $(CURDIR)/Source/pysvn/__init__.py $(CURDIR)/Source/pysvn/python3/python$$i/dist-packages/pysvn ; \
+		mv $(CURDIR)/Source/pysvn/_pysvn*.so $(CURDIR)/Source/pysvn/python3/python$$i/dist-packages/pysvn ; \
+		$(MAKE) clean -C $(CURDIR)/Source ; \
+	done
 
-	mv $(CURDIR)/Source/pysvn/__init__.py $(CURDIR)/Source/pysvn/python3/
-	mv $(CURDIR)/Source/pysvn/_pysvn_3_*.so $(CURDIR)/Source/pysvn/python3/
-	$(MAKE) clean -C $(CURDIR)/Source
+override_dh_python3:
+	dh_python3
+	rm -rf $(CURDIR)/debian/python3-svn/usr/lib/python3.*
 
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf $(CURDIR)/Source/pysvn/python2
 	rm -rf $(CURDIR)/Source/pysvn/python3
+	rm -rf $(CURDIR)/debian/python-pysvn
+	rm -rf $(CURDIR)/debian/python-pysvn-dbg
+	rm -rf $(CURDIR)/debian/python3-pysvn

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pysvn.git



More information about the Python-modules-commits mailing list