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

mithrandi-guest at users.alioth.debian.org mithrandi-guest at users.alioth.debian.org
Sat Jan 26 11:18:02 UTC 2008


    Date: Saturday, January 26, 2008 @ 11:18:02
  Author: mithrandi-guest
Revision: 4421

Use a more correct mechanism to run the tests.

Added:
  packages/python-axiom/trunk/debian/runtrial.py
Modified:
  packages/python-axiom/trunk/debian/changelog
  packages/python-axiom/trunk/debian/rules

Modified: packages/python-axiom/trunk/debian/changelog
===================================================================
--- packages/python-axiom/trunk/debian/changelog	2008-01-26 10:53:50 UTC (rev 4420)
+++ packages/python-axiom/trunk/debian/changelog	2008-01-26 11:18:02 UTC (rev 4421)
@@ -8,6 +8,8 @@
   * New upstream release.
   * Bump debhelper to v6.
   * Bump Standards-Version.
+  * Change the way tests are run during the build; the previous method was
+    rather hacky, and didn't work correctly.
 
  -- Sandro Tosi <matrixhasu at gmail.com>  Thu, 03 Jan 2008 11:59:15 +0100
 

Modified: packages/python-axiom/trunk/debian/rules
===================================================================
--- packages/python-axiom/trunk/debian/rules	2008-01-26 10:53:50 UTC (rev 4420)
+++ packages/python-axiom/trunk/debian/rules	2008-01-26 11:18:02 UTC (rev 4421)
@@ -3,8 +3,11 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
 PKGDIR=debian/python-axiom/
+
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 install/python-axiom::
-	PYTHONPATH="$(CURDIR)/$(DEB_BUILDDIR)/build/lib" /usr/bin/trial axiom
+	$(call cdbs_python_binary,python$(cdbs_python_compile_version)) debian/runtrial.py $(PKGDIR) axiom
+endif
 
 binary-post-install/python-axiom::
 	rm -rf $(PKGDIR)/usr/share/python-support/python-axiom/build/

Added: packages/python-axiom/trunk/debian/runtrial.py
===================================================================
--- packages/python-axiom/trunk/debian/runtrial.py	                        (rev 0)
+++ packages/python-axiom/trunk/debian/runtrial.py	2008-01-26 11:18:02 UTC (rev 4421)
@@ -0,0 +1,18 @@
+import sys
+from os.path import join
+from distutils.sysconfig import get_python_lib
+from site import addsitedir
+from pprint import pprint
+
+root = sys.argv.pop(1)
+site_packages = get_python_lib()
+
+_path = sys.path[:]
+sys.path[:] = []
+addsitedir(join(root, site_packages[1:]))
+sys.path.extend(_path)
+
+pprint(sys.path)
+
+from twisted.scripts.trial import run
+run()




More information about the Python-modules-commits mailing list