Package: python-setproctitle
Version: 1.1.8-2
Followup-For: Bug #833180
User: [email protected]
Usertags: origin-ubuntu yakkety ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/rules: Enable tests for py2 and py3.

Thanks for considering the patch.

Corey Bryant


-- System Information:
Debian Release: stretch/sid
  APT prefers yakkety
  APT policy: (500, 'yakkety')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-31-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru python-setproctitle-1.1.8/debian/rules python-setproctitle-1.1.8/debian/rules
--- python-setproctitle-1.1.8/debian/rules	2014-03-05 14:37:54.000000000 -0500
+++ python-setproctitle-1.1.8/debian/rules	2016-08-02 09:26:24.000000000 -0400
@@ -16,22 +16,25 @@
 #	dh_strip --dbg-package=python-setproctitle-dbg
 
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-#
-#override_dh_auto_test: $(PYTHON2:%=test-%-stamp) $(PYTHON3:%=test-%-stamp)
-#test-%-stamp:	
-#	mkdir -p build/test-$*
-#	python$* setup.py build
-#	python$* setup.py install_lib -d build/test-$*
-#ifeq (,$(findstring kfreebsd,$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)))
-#	PYTHONPATH=build/test-$* python$* /usr/bin/nosetests -v tests
-#endif
-#	touch test-python-$*-stamp
-#
-test-python%:
-	true
-#	python$* nosetests-$* -v tests
 
-override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
+override_dh_auto_test:
+	set -e ; for pyvers in $(PYTHON2) $(PYTHON3); do \
+		mkdir -p build/test-$$pyvers; \
+		python$$pyvers setup.py build; \
+		python$$pyvers setup.py install_lib -d build/test-$$pyvers; \
+	done
+ifeq (,$(findstring kfreebsd,$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)))
+	set -e ; for pyvers in $(PYTHON2); do \
+		$(CC) tests/pyrun.c $$(python$$pyvers-config --includes --libs) -o tests/pyrun2; \
+		PYTHONPATH=build/test-$$pyvers python$$pyvers /usr/bin/nosetests -v tests; \
+	done
+	set -e ; for pyvers in $(PYTHON3); do \
+		2to3 -w --no-diffs tests/setproctitle_test.py; \
+		$(CC) tests/pyrun.c $$(python$$pyvers-config --includes --libs) -o tests/pyrun3; \
+		PYTHONPATH=build/test-$$pyvers python$$pyvers /usr/bin/nosetests3 -v tests; \
+	done
+endif
+
 endif
 
 build-python%:
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to