[Python-apps-commits] r11156 - in packages/pyrit/trunk/debian (rules)

chrisk-guest at users.alioth.debian.org chrisk-guest at users.alioth.debian.org
Sat Aug 9 21:04:35 UTC 2014


    Date: Saturday, August 9, 2014 @ 21:04:34
  Author: chrisk-guest
Revision: 11156

rules: Convert to use pybuild

Modified:
  packages/pyrit/trunk/debian/rules

Modified: packages/pyrit/trunk/debian/rules
===================================================================
--- packages/pyrit/trunk/debian/rules	2014-08-09 21:04:15 UTC (rev 11155)
+++ packages/pyrit/trunk/debian/rules	2014-08-09 21:04:34 UTC (rev 11156)
@@ -4,9 +4,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-PYVERS = $(shell pyversions -r -v)
-PYPLATFORM = $(shell python -c 'import distutils.util as d; print d.get_platform()')
-
 # If DEB_BUILD_OPTIONS contains parallel=N, use N number of cores for the
 # unit tests as well. Whatever N is, pyrit won't use more than the number
 # of cores available. If unset, default to 1
@@ -14,23 +11,22 @@
 
 
 %:
-	dh $@ --with python2
+	dh $@ --with python2 --buildsystem=pybuild
 
+
 override_dh_auto_configure:
 	dh_auto_configure
 	sed -e 's,<CORES>,$(NUMCORES),' debian/config.build.in > debian/config.build
 
+
 override_dh_auto_test:
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	set -e ;\
-	cd test ;\
-	for py in $(PYVERS); do \
-		PYRIT_CONFIG_FILE=../debian/config.build \
-		PYTHONPATH=$(CURDIR)/build/lib.$(PYPLATFORM)-$$py \
-			python$$py test_pyrit.py ;\
-	done
-endif
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="cd test/ && {interpreter} test_pyrit.py" \
+	dh_auto_test ;\
+	res=$$? ;\
+	[ $$res -eq 0 ] || exit $$res
 
+
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -f debian/config.build




More information about the Python-apps-commits mailing list