[Python-modules-commits] r21247 - in packages/gamera/trunk/debian (changelog rules run-tests.py)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Mon Apr 16 19:06:21 UTC 2012


    Date: Monday, April 16, 2012 @ 19:06:17
  Author: jwilk
Revision: 21247

When running tests, set sys.path directly in debian/run-tests.py rather than in debian/rules via PYTHONPATH.

Modified:
  packages/gamera/trunk/debian/changelog
  packages/gamera/trunk/debian/rules
  packages/gamera/trunk/debian/run-tests.py

Modified: packages/gamera/trunk/debian/changelog
===================================================================
--- packages/gamera/trunk/debian/changelog	2012-04-16 18:22:34 UTC (rev 21246)
+++ packages/gamera/trunk/debian/changelog	2012-04-16 19:06:17 UTC (rev 21247)
@@ -14,8 +14,10 @@
   * Cherry-pick upstream patch to fix compatibility with GCC 4.7.
     (gcc-4.7-compat.diff)
   * Update the copyright file.
+  * When running tests, set sys.path directly in debian/run-tests.py rather
+    than in debian/rules via PYTHONPATH.
 
- -- Jakub Wilk <jwilk at debian.org>  Mon, 16 Apr 2012 20:22:16 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Mon, 16 Apr 2012 21:05:02 +0200
 
 gamera (3.3.2-2) unstable; urgency=low
 

Modified: packages/gamera/trunk/debian/rules
===================================================================
--- packages/gamera/trunk/debian/rules	2012-04-16 18:22:34 UTC (rev 21246)
+++ packages/gamera/trunk/debian/rules	2012-04-16 19:06:17 UTC (rev 21247)
@@ -12,8 +12,6 @@
 endif
 
 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)
-
 default_pythonpath = $(call pythonpath,$(shell pyversions -d))
 
 version = $(shell dpkg-parsechangelog | grep ^Version | cut -d ' ' -f 2)
@@ -41,8 +39,8 @@
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	set -x -e; \
 	for python in $(shell pyversions -r); do \
-		PYTHONPATH=$(call pythonpath,$$python) $$python debian/run-tests.py; \
-		PYTHONPATH=$(call pythonpath_dbg,$$python) $$python-dbg debian/run-tests.py; \
+		$$python debian/run-tests.py; \
+		$$python-dbg debian/run-tests.py; \
 	done
 endif
 

Modified: packages/gamera/trunk/debian/run-tests.py
===================================================================
--- packages/gamera/trunk/debian/run-tests.py	2012-04-16 18:22:34 UTC (rev 21246)
+++ packages/gamera/trunk/debian/run-tests.py	2012-04-16 19:06:17 UTC (rev 21247)
@@ -6,4 +6,10 @@
 gamera.paths.test = os.path.join('..', 'gamera', 'test')
 sys.argv[1:1] = ['--verbose']
 
+from distutils.command.build import build
+from distutils.core import Distribution
+build = build(Distribution())
+build.finalize_options()
+sys.path[0:0] = os.path.join('..', build.build_platlib)
+
 execfile('/usr/bin/nosetests')




More information about the Python-modules-commits mailing list