[eccodes] 99/106: Support all python3 versions. Closes: #867531

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jul 28 09:05:49 UTC 2017


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

mckinstry pushed a commit to branch debian/master
in repository eccodes.

commit 2545c3be8855aa7c1b905214e5a64cab8eb066de
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Jul 10 13:13:28 2017 +0100

    Support all python3 versions. Closes: #867531
---
 debian/changelog |  1 +
 debian/rules     | 25 ++++++++++++++-----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c4b44eb..8966ee2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 eccodes (2.4.0-2) UNRELEASED; urgency=medium
 
   * Standards-Version: 4.0.0; no changes required
+  * Support all python3 versions. Closes: #867531
 
  -- Alastair McKinstry <mckinstry at debian.org>  Mon, 10 Jul 2017 12:59:21 +0100
 
diff --git a/debian/rules b/debian/rules
index 59494a3..0ee4ca0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,8 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
 export LDFLAGS CFLAGS CPPFLAGS CXXFLAGS
 
-PY3VERSM:=$(shell py3versions -d)m
+PY3VERS:=$(shell py3versions -s)
+PY3VERSD:=$(shell py3versions -d)
 
 # Don't test on mips. will time out most of the time on low-powered archs
 DO_TEST:=true
@@ -61,17 +62,19 @@ override_dh_install:
 	cp -a debian/tmp/usr/lib/lib* debian/tmp/${LIBDIR}
 	cp -a debian/tmp/usr/lib/pkgconfig debian/tmp/${LIBDIR}
 	for d in libeccodes_f90.so	libeccodes.so ; do \
-                cp debian/tmp/$(LIBDIR)/$$d.0 debian/tmp/$(LIBDIR)/$$d.0.0.0 ; \
-                chrpath -d debian/tmp/$(LIBDIR)/$$d.0.0.0 ; done
+		cp debian/tmp/$(LIBDIR)/$$d.0 debian/tmp/$(LIBDIR)/$$d.0.0.0 ; \
+		chrpath -d debian/tmp/$(LIBDIR)/$$d.0.0.0 ; done
 	dh_link -p libeccodes0 $(LIBDIR)/libeccodes.so.0.0.0  $(LIBDIR)/libeccodes.so.0
 	dh_link -p libeccodes0 $(LIBDIR)/libeccodes_f90.so.0.0.0  $(LIBDIR)/libeccodes_f90.so.0
 	dh_link -p libeccodes-dev $(LIBDIR)/libeccodes.so.0.0.0 $(LIBDIR)/libeccodes.so
 	dh_link -p libeccodes-dev $(LIBDIR)/libeccodes_f90.so.0.0.0 $(LIBDIR)/libeccodes_f90.so
-	(cd debian/build/python && python3 ./setup.py install --prefix=$(CURDIR)/debian/tmp/usr )
+	for py in $(PY3VERS); do \
+		(cd debian/build/python && $$py ./setup.py install --prefix=$(CURDIR)/debian/tmp/usr ) ; \
+		done
 	chrpath -d ./debian/tmp/usr/lib/python*/site-packages/gribapi/*.so
 	for d in debian/tmp/usr/bin/* ; do \
-                ( chrpath -d $$d || echo "Ignoring chrpath error for non-ELF $d" ); \
-                done
+		( chrpath -d $$d || echo "Ignoring chrpath error for non-ELF $d" ); \
+		done
 	dh_numpy3
 	dh_install
 	#
@@ -81,16 +84,16 @@ override_dh_install:
 	cp debian/tmp/usr/share/eccodes/cmake/* debian/libeccodes-dev/$(LIBDIR)/cmake/eccodes
 	sed -e 's%$${_IMPORT_PREFIX}%/usr%' \
 	       < debian/tmp/usr/share/eccodes/cmake/eccodes-targets-release.cmake | \
-	sed -e 's%-l${PY3VERSM} %%g' | \
+	sed -e 's%-l${PY3VERSD} %%g' | \
 	sed -e 's%/usr/lib/libeccodes%${LIBDIR}/libeccodes%' | \
 	sed -e 's%${LIBDIR}/libopenjpeg.so;%%' | sed -e 's%;${LIBDIR}/libpng.so%%g' \
 	      > debian/libeccodes-dev/$(LIBDIR)/cmake/eccodes/eccodes-targets-release.cmake
 	sed -e 's%;${LIBDIR}/libopenjpeg.so%%g' \
-	        < debian/tmp/usr/share/eccodes/cmake/eccodes-config.cmake | \
-	sed -e 's%-l${PY3VERSM} %%g' | \
-	sed -s 's%/usr/include/${PY3VERSM};%%g' | sed -e 's%/usr/include/python2.7;%%g' | \
+		< debian/tmp/usr/share/eccodes/cmake/eccodes-config.cmake | \
+	sed -e 's%-l${PY3VERSD} %%g' | \
+	sed -s 's%/usr/include/${PY3VERSD};%%g' | sed -e 's%/usr/include/python2.7;%%g' | \
 	sed -e 's%;${LIBDIR}/libpng.so%%g' \
-	        > debian/libeccodes-dev/$(LIBDIR)/cmake/eccodes/grib_api-config.cmake
+		> debian/libeccodes-dev/$(LIBDIR)/cmake/eccodes/grib_api-config.cmake
 
 
 override_dh_auto_clean:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/eccodes.git



More information about the debian-science-commits mailing list