[pyepr] 05/10: Switch to pybuild

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Tue Aug 8 08:40:40 UTC 2017


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

a_valentino-guest pushed a commit to branch master
in repository pyepr.

commit 61fdb60241af2e06c7cc85e59965a70873492c2f
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Tue Aug 8 07:31:07 2017 +0000

    Switch to pybuild
---
 debian/changelog |  2 ++
 debian/rules     | 59 +++++++++++++-------------------------------------------
 2 files changed, 15 insertions(+), 46 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 026f154..7691146 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ pyepr (0.9.3-2) UNRELEASED; urgency=medium
   [ Antonio Valentino ]
   * remove dbg packages form the control file (now they are generated
     automatically)
+  * switch to pybuild
   * debian/copyright
     - fix format URL
   * debian/control
@@ -17,6 +18,7 @@ pyepr (0.9.3-2) UNRELEASED; urgency=medium
     - reformat using cme 
   * debian/rules
     - no longer parse debian changelog (fix lintian warning)
+    - enable hardening flags
 
  -- Bas Couwenberg <sebastic at debian.org>  Mon, 28 Mar 2016 16:49:32 +0200
 
diff --git a/debian/rules b/debian/rules
index 07c6541..3dc2aa7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,32 +3,34 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+export PYBUILD_NAME=epr
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
 
 include /usr/share/dpkg/pkg-info.mk
 BUILD_DATE="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
 SPHINXOPTS := -D today=\"$(BUILD_DATE)\"
 SPHINXOPTS += -D html_last_updated_fmt=\"$(BUILD_DATE)\"
 
+
 # Get the supported Python versions
 #PY2VERS=$(shell pyversions -vr)
 PY3VERS=$(shell py3versions -vr)
 
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 export CFLAGS ?= -O0
 endif
 
 
 %:
-	dh $@ --with python2,python3,sphinxdoc --buildsystem=python_distutils
+	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
 
 
-build-python%:
-	python$* setup.py build
-	python$*-dbg setup.py build
-
-
-override_dh_auto_build: $(PY3VERS:%=build-python%)
-	dh_auto_build
+override_dh_gencontrol:
+	dh_numpy
+	dh_numpy3
+	dh_gencontrol
 
 
 override_dh_auto_clean:
@@ -53,31 +55,6 @@ override_dh_auto_test:
 #endif
 
 
-override_dh_install:
-	# Install everything excluding the *_d.so debug extensions to python-epr
-	dh_install -X"*_d.so" "debian/tmp/usr/lib/python2*" -p python-epr
-	dh_install -X"*dmu.so" -X"*dm.so" "debian/tmp/usr/lib/python3*" -p python3-epr
-
-	# Install the debug extensions to python-epr-dbg
-	dh_install "debian/tmp/usr/lib/python2*/*-packages/*_d.so" -p python-epr-dbg
-	dh_install "debian/tmp/usr/lib/python3*/*-packages/*.cpython-??dm*.so" -p python3-epr-dbg
-	find debian/python3-epr -name '*.cpython-??dm-*.so' | xargs -r rm -f
-
-	# Continue with regular dh_install
-	dh_install
-	dh_numpy
-	dh_numpy3
-
-
-install-python%:
-	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
-	python$*-dbg setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
-
-
-override_dh_auto_install: $(PY3VERS:%=install-python%)
-	dh_auto_install
-
-
 override_dh_installchangelogs:
 	dh_installchangelogs -k doc/NEWS.txt
 
@@ -101,16 +78,6 @@ endif
 	dh_installdocs
 
 
-override_dh_python2:
-	dh_python2
-	dh_numpy
-
-
-override_dh_python3:
-	dh_python3
-	dh_numpy3
-
-
-.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_auto_test \
-        override_dh_installchangelogs override_dh_compress override_dh_install \
-        override_dh_auto_install dh_sphinxdoc override_dh_installdocs
+.PHONY: override_dh_gencontrol override_dh_auto_clean override_dh_auto_test \
+        override_dh_installchangelogs override_dh_compress \
+        dh_sphinxdoc override_dh_installdocs

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pyepr.git



More information about the Pkg-grass-devel mailing list