summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorsylvain thenault <sylvain.thenault@logilab.fr>2009-03-24 16:18:18 +0100
committersylvain thenault <sylvain.thenault@logilab.fr>2009-03-24 16:18:18 +0100
commit2f9539af8c85fce925842b6932c3a5ebc69c5362 (patch)
tree6dc53cd07d2f43e5a702c33820fa8ed8ac0c6faa /debian/rules
parent68d8b7ba338b4d17c3b77dd8df9dae58835e3e32 (diff)
downloadlogilab-common-2f9539af8c85fce925842b6932c3a5ebc69c5362.tar.gz
backport Sandro Tosi 0.38.1-1 changes
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules24
1 files changed, 17 insertions, 7 deletions
diff --git a/debian/rules b/debian/rules
index e15c1e9..dac6f39 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,16 @@ build-stamp:
dh_testdir
# python module build
- python setup.py -q build
+ NO_SETUPTOOLS=1 python setup.py -q build
+
+ # run tests
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ # we need this hack because we have to import "logilab.common.pytest"
+ # but since it's a namespace package, we need to "simulate" it
+ touch $(CURDIR)/build/lib/logilab/__init__.py
+ -PYTHONPATH=$(CURDIR)/build/lib/ $(CURDIR)/build/scripts-2.5/pytest
+ rm -f $(CURDIR)/build/lib/logilab/__init__.py
+endif
# build doc
$(MAKE) -C doc
@@ -30,11 +39,13 @@ clean:
# clean doc
$(MAKE) -C doc clean
- python setup.py clean
+ NO_SETUPTOOLS=1 python setup.py clean
+
+ [ ! -d build ] || rm -rf build
find . -name "*.pyc" -delete
- dh_clean build-stamp build
+ dh_clean build-stamp
install: build
dh_testdir
@@ -42,9 +53,9 @@ install: build
dh_clean -k
dh_installdirs
- python setup.py -q install --no-compile --prefix=debian/python-logilab-common/usr/ --install-headers=debian/python-logilab-common/usr/include/ --install-scripts=debian/python-logilab-common/usr/bin
+ NO_SETUPTOOLS=1 python setup.py -q install --no-compile --root=debian/python-logilab-common/ --install-headers=usr/include/ --install-scripts=usr/bin/
- # remove test directory (installed in in the doc directory)
+ # remove test directory
rm -rf debian/python-logilab-common/usr/lib/python*/site-packages/logilab/common/test
# Build architecture-independent files here.
@@ -52,7 +63,7 @@ binary-indep: build install
dh_testdir
dh_testroot
dh_install -i
- dh_pycentral -i
+ dh_pysupport -i
dh_installchangelogs -i ChangeLog
dh_installexamples -i
dh_installdocs -i README doc/apidoc/
@@ -69,4 +80,3 @@ binary-arch:
binary: binary-indep
.PHONY: build clean binary binary-indep binary-arch
-