[Python-modules-commits] r30315 - in packages/django-countries/trunk/debian (control rules)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Thu Aug 28 19:30:21 UTC 2014


    Date: Thursday, August 28, 2014 @ 19:30:20
  Author: fladi-guest
Revision: 30315

Switch buildsystem to pybuild.

Modified:
  packages/django-countries/trunk/debian/control
  packages/django-countries/trunk/debian/rules

Modified: packages/django-countries/trunk/debian/control
===================================================================
--- packages/django-countries/trunk/debian/control	2014-08-28 19:27:50 UTC (rev 30314)
+++ packages/django-countries/trunk/debian/control	2014-08-28 19:30:20 UTC (rev 30315)
@@ -4,6 +4,7 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Michael Fladischer <FladischerMichael at fladi.at>
 Build-Depends: debhelper (>= 7.0.50~),
+               dh-python,
                iso-codes,
                python-all,
                python-django,

Modified: packages/django-countries/trunk/debian/rules
===================================================================
--- packages/django-countries/trunk/debian/rules	2014-08-28 19:27:50 UTC (rev 30314)
+++ packages/django-countries/trunk/debian/rules	2014-08-28 19:30:20 UTC (rev 30315)
@@ -5,30 +5,21 @@
 #export DH_VERBOSE=1
 
 %:
-	dh --with python2 $@
+	dh $@ --with python2 --buildsystem=pybuild
 
-.PHONY: override_dh_auto_test
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	django-admin startproject testproject
-	if [ -d testproject/testproject ]; then \
-		cp debian/settings.py testproject/testproject ; \
-	else \
-		cp debian/settings.py testproject ; \
-	fi
 	set -e; \
 	for python in $(shell pyversions -r); do \
-	  rm -f testproject/test.db3 ; \
-	  PYTHONPATH=".:testproject" $$python testproject/manage.py syncdb --settings=testproject.settings --noinput ;\
-	  PYTHONPATH=".:testproject" $$python testproject/manage.py test --settings=testproject.settings django_countries ;\
+	  PYTHONPATH="." DJANGO_SETTINGS_MODULE=django_countries.tests.settings $$python $(shell which django-admin) test django_countries.tests;\
 	done
-	rm -rf testproject
 endif
 
-.PHONY: override_dh_python2
 override_dh_python2:
 	set -e; \
 	for python in $(shell pyversions -r); do \
-	  ln -s /usr/share/python-django-countries/locale debian/python-django-countries/usr/lib/$$python/*-packages/django_countries/; \
+		ln -s /usr/share/python-django-countries/locale debian/python-django-countries/usr/lib/$$python/dist-packages/django_countries/; \
+		mkdir -p debian/python-django-countries/usr/lib/$$python/dist-packages/django_countries/static; \
+		ln -s /usr/share/flags/countries/16x11 debian/python-django-countries/usr/lib/$$python/dist-packages/django_countries/static/flags; \
 	done
 	dh_python2




More information about the Python-modules-commits mailing list