[Python-modules-commits] r13649 - in packages/python-djvulibre/trunk/debian (3 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Fri Jun 25 22:29:48 UTC 2010


    Date: Friday, June 25, 2010 @ 22:29:48
  Author: jwilk
Revision: 13649

Run tests at build time.

Modified:
  packages/python-djvulibre/trunk/debian/changelog
  packages/python-djvulibre/trunk/debian/control
  packages/python-djvulibre/trunk/debian/rules

Modified: packages/python-djvulibre/trunk/debian/changelog
===================================================================
--- packages/python-djvulibre/trunk/debian/changelog	2010-06-25 22:29:14 UTC (rev 13648)
+++ packages/python-djvulibre/trunk/debian/changelog	2010-06-25 22:29:48 UTC (rev 13649)
@@ -3,8 +3,10 @@
   * New upstream release.
   * Update homepage URL.
   * Fix FTBFS with nostrip build option.
+  * Run tests at build time:
+    + Build-depend on python-nose.
 
- -- Jakub Wilk <jwilk at debian.org>  Fri, 25 Jun 2010 23:33:02 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Sat, 26 Jun 2010 00:29:18 +0200
 
 python-djvulibre (0.1.17-2) unstable; urgency=low
 

Modified: packages/python-djvulibre/trunk/debian/control
===================================================================
--- packages/python-djvulibre/trunk/debian/control	2010-06-25 22:29:14 UTC (rev 13648)
+++ packages/python-djvulibre/trunk/debian/control	2010-06-25 22:29:48 UTC (rev 13649)
@@ -4,7 +4,7 @@
 Maintainer: Jakub Wilk <jwilk at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Build-Depends: debhelper (>= 7.3.5),
- python-support (>= 0.90), python-setuptools, cython, python-all-dev, python-all-dbg,
+ python-support (>= 0.90), python-setuptools, cython, python-all-dev, python-all-dbg, python-nose,
  libdjvulibre-dev, pkg-config
 Build-Depends-Indep: python-sphinx, python-pygments, graphviz
 Standards-Version: 3.8.4

Modified: packages/python-djvulibre/trunk/debian/rules
===================================================================
--- packages/python-djvulibre/trunk/debian/rules	2010-06-25 22:29:14 UTC (rev 13648)
+++ packages/python-djvulibre/trunk/debian/rules	2010-06-25 22:29:48 UTC (rev 13649)
@@ -3,8 +3,12 @@
 PYX_FILES = $(wildcard djvu/*.pyx)
 C_FILES = $(PYX_FILES:.pyx=.c)
 
-PYTHONPATH = $(wildcard $(CURDIR)/build/lib.*-$(shell pyversions -dv))
+nosetests = /usr/bin/nosetests --with-doctest --verbose
+tests = decode.py sexpr.py const.py
 
+pythonpath = $$(_py_=$(strip $(1)); _py_=$${_py_\#python}; ls -d $(CURDIR)/build/lib.*-$${_py_})
+pythonpath_dbg = $$(_py_=$(strip $(1)); _py_=$${_py_\#python}; ls -d $(CURDIR)/build/lib_d.*-$${_py_} 2>/dev/null || ls -d $(CURDIR)/build/lib.*-$${_py_}-pydebug)
+
 .PHONY: override_dh_auto_build
 override_dh_auto_build: build/stamp
 	
@@ -23,7 +27,7 @@
 	dh_installdocs -X.buildinfo -Xobjects.inv
 
 doc/stamp: build/stamp
-	$(MAKE) -C doc/ html PYTHONPATH=$(PYTHONPATH):$(CURDIR)
+	$(MAKE) -C doc/ html PYTHONPATH=$(call pythonpath,$(shell pyversions -d)):$(CURDIR)
 	touch $(@)
 
 .PHONY: override_dh_auto_clean
@@ -40,6 +44,17 @@
 	cd debian/*-dbg/usr/lib/debug/usr/lib && mv pyshared pymodules
 endif
 
+.PHONY: override_dh_auto_test
+override_dh_auto_test:
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+	cd tests && \
+	set -x -e; \
+	for python in $(shell pyversions -r); do \
+	    PYTHONPATH=$(call pythonpath,$$python) $$python $(nosetests) $(tests); \
+	    PYTHONPATH=$(call pythonpath_dbg,$$python) $$python-dbg $(nosetests) $(tests); \
+	done
+endif
+
 .PHONY: build build-arch build-indep binary binary-arch binary-indep clean
 build build-arch build-indep binary binary-arch binary-indep clean:
 	dh $(@)




More information about the Python-modules-commits mailing list