[Python-modules-commits] r7941 - in packages/pycha/trunk/debian (changelog rules runtests.py)
bernat at users.alioth.debian.org
bernat at users.alioth.debian.org
Sat Mar 21 08:24:06 UTC 2009
Date: Saturday, March 21, 2009 @ 08:24:05
Author: bernat
Revision: 7941
Add back unittests with a piece of code stolen from python-axiom.
Added:
packages/pycha/trunk/debian/runtests.py
Modified:
packages/pycha/trunk/debian/changelog
packages/pycha/trunk/debian/rules
Modified: packages/pycha/trunk/debian/changelog
===================================================================
--- packages/pycha/trunk/debian/changelog 2009-03-20 22:25:54 UTC (rev 7940)
+++ packages/pycha/trunk/debian/changelog 2009-03-21 08:24:05 UTC (rev 7941)
@@ -1,3 +1,9 @@
+pycha (0.4.2-3) UNRELEASED; urgency=low
+
+ * Add back unittests with a piece of code stolen from python-axiom.
+
+ -- Vincent Bernat <bernat at debian.org> Sat, 21 Mar 2009 09:17:33 +0100
+
pycha (0.4.2-2) unstable; urgency=low
* Recompile with python-support from unstable. Closes: #520224.
Modified: packages/pycha/trunk/debian/rules
===================================================================
--- packages/pycha/trunk/debian/rules 2009-03-20 22:25:54 UTC (rev 7940)
+++ packages/pycha/trunk/debian/rules 2009-03-21 08:24:05 UTC (rev 7941)
@@ -12,6 +12,12 @@
DEB_INSTALL_CHANGELOGS_ALL = CHANGES.txt
DEB_INSTALL_MANPAGES_python-pycha = debian/chavier.7
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+install/python-pycha::
+ $(call cdbs_python_binary,python$(cdbs_python_compile_version)) \
+ debian/runtests.py debian/python-pycha
+endif
+
clean::
# This file has been modified and we don't need it
rm pycha.egg-info/SOURCES.txt
Added: packages/pycha/trunk/debian/runtests.py
===================================================================
--- packages/pycha/trunk/debian/runtests.py (rev 0)
+++ packages/pycha/trunk/debian/runtests.py 2009-03-21 08:24:05 UTC (rev 7941)
@@ -0,0 +1,15 @@
+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)
+sys.path.append("tests")
+
+execfile("tests/runner.py")
More information about the Python-modules-commits
mailing list