[Python-modules-commits] r7935 - in packages/cerealizer/trunk/debian (3 files)

bernat at users.alioth.debian.org bernat at users.alioth.debian.org
Fri Mar 20 20:49:11 UTC 2009


    Date: Friday, March 20, 2009 @ 20:49:10
  Author: bernat
Revision: 7935

Steal the way to run tests from python-axiom

Added:
  packages/cerealizer/trunk/debian/runtests.py
Modified:
  packages/cerealizer/trunk/debian/changelog
  packages/cerealizer/trunk/debian/rules

Modified: packages/cerealizer/trunk/debian/changelog
===================================================================
--- packages/cerealizer/trunk/debian/changelog	2009-03-20 19:47:05 UTC (rev 7934)
+++ packages/cerealizer/trunk/debian/changelog	2009-03-20 20:49:10 UTC (rev 7935)
@@ -1,4 +1,4 @@
-cerealizer (0.7-3) UNRELEASED; urgency=low
+cerealizer (0.7-3) unstable; urgency=low
 
   * Invoke unit tests in a way that works with newer
     python-support. Closes: #516139.

Modified: packages/cerealizer/trunk/debian/rules
===================================================================
--- packages/cerealizer/trunk/debian/rules	2009-03-20 19:47:05 UTC (rev 7934)
+++ packages/cerealizer/trunk/debian/rules	2009-03-20 20:49:10 UTC (rev 7935)
@@ -6,15 +6,10 @@
 include /usr/share/cdbs/1/class/python-distutils.mk
 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 
-
 DEB_COMPRESS_EXCLUDE := .py
 
-
-binary-install/$(DEB_PYTHON_MODULE_PACKAGE)::
-	find debian/$(cdbs_curpkg)/usr/share/ -type f -exec chmod -R a-x {} \;
-
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-common-install-indep::
-	PYTHONPATH='debian/python-cerealizer/usr/lib/$(shell pyversions -d)/site-packages' \
-		$(shell pyversions -d) test/regtest.py
+install/python-cerealizer::
+	$(call cdbs_python_binary,python$(cdbs_python_compile_version)) \
+		debian/runtests.py debian/python-cerealizer
 endif

Added: packages/cerealizer/trunk/debian/runtests.py
===================================================================
--- packages/cerealizer/trunk/debian/runtests.py	                        (rev 0)
+++ packages/cerealizer/trunk/debian/runtests.py	2009-03-20 20:49:10 UTC (rev 7935)
@@ -0,0 +1,14 @@
+import sys
+from os.path import join
+from distutils.sysconfig import get_python_lib
+from site import addsitedir
+
+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)
+
+execfile("test/regtest.py")




More information about the Python-modules-commits mailing list