[Python-modules-commits] r18398 - in packages/logilab-astng/trunk/debian (changelog rules)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Tue Aug 30 21:15:17 UTC 2011
Date: Tuesday, August 30, 2011 @ 21:15:15
Author: morph
Revision: 18398
* debian/rules
- build for all the python supported versions
- run tests
Modified:
packages/logilab-astng/trunk/debian/changelog
packages/logilab-astng/trunk/debian/rules
Modified: packages/logilab-astng/trunk/debian/changelog
===================================================================
--- packages/logilab-astng/trunk/debian/changelog 2011-08-30 05:56:26 UTC (rev 18397)
+++ packages/logilab-astng/trunk/debian/changelog 2011-08-30 21:15:15 UTC (rev 18398)
@@ -2,8 +2,11 @@
* debian/control
- removed Sylvain from Uploaders: thanks for your work!
+ * debian/rules
+ - build for all the python supported versions
+ - run tests
- -- Sandro Tosi <morph at debian.org> Thu, 25 Aug 2011 18:36:42 +0200
+ -- Sandro Tosi <morph at debian.org> Tue, 30 Aug 2011 23:14:25 +0200
logilab-astng (0.22.0-1) unstable; urgency=low
Modified: packages/logilab-astng/trunk/debian/rules
===================================================================
--- packages/logilab-astng/trunk/debian/rules 2011-08-30 05:56:26 UTC (rev 18397)
+++ packages/logilab-astng/trunk/debian/rules 2011-08-30 21:15:15 UTC (rev 18398)
@@ -11,18 +11,36 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-PYVERS := $(shell pyversions -s -v)
+PYTHONS := $(shell pyversions -s)
+PYLIBPATH := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib")
+LOGILAB_COMMON_DIR := $(shell dirname `python -c "import logilab.common as lc ; print lc.__file__" 2>/dev/null`)
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
-
- NO_SETUPTOOLS=1 python setup.py -q build
+ set -e;
+ for python in $(PYTHONS) ; do \
+ NO_SETUPTOOLS=1 $$python setup.py -q build ; \
+ done
+
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
- -./test/fulltest.sh
+ set -e \;
+ for python in $(PYTHONS) ; do \
+ PYLIBPATH=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib") ;\
+ LOGILAB_COMMON_DIR=$$(dirname `$$python -c "import logilab.common as lc ; print lc.__file__" 2>/dev/null`) ;\
+ # we need this hack because we have to initialize the namespace ;\
+ touch $(CURDIR)/$(PYLIBPATH)/logilab/__init__.py ;\
+ # even bigger hack: we symlink the common module in our temp build/ ;\
+ # because it has to be in the same namespace as astng ;\
+ ln -s $(LOGILAB_COMMON_DIR) $(CURDIR)/$(PYLIBPATH)/logilab/ ;\
+ # we can now run the test, at last...
+ PYTHONPATH=$(CURDIR)/$(PYLIBPATH) $$python `which pytest` ;\
+ # and cleanup the mess
+ rm -rf $(CURDIR)/$(PYLIBPATH)/logilab/__init__.py $(CURDIR)/$(PYLIBPATH)/logilab/common ;\
+ done
endif
touch build-stamp
More information about the Python-modules-commits
mailing list