diff options
author | Julien Jehannet <julien.jehannet@logilab.fr> | 2010-11-17 15:44:25 +0100 |
---|---|---|
committer | Julien Jehannet <julien.jehannet@logilab.fr> | 2010-11-17 15:44:25 +0100 |
commit | 9b6e46b21a3c5838b827388380f9dc4561c6b065 (patch) | |
tree | a1345dafeeab7aa17b1a9cd19372f28fa26fd22e /debian.py3k | |
parent | 4c6af8016f73010850d1623350027c6f4f5164f3 (diff) | |
download | logilab-common-9b6e46b21a3c5838b827388380f9dc4561c6b065.tar.gz |
[debian] update debian rules with new debhelper API
Diffstat (limited to 'debian.py3k')
-rw-r--r-- | debian.py3k/control | 14 | ||||
-rwxr-xr-x | debian.py3k/rules | 97 |
2 files changed, 39 insertions, 72 deletions
diff --git a/debian.py3k/control b/debian.py3k/control index 6a873bf..f9db90d 100644 --- a/debian.py3k/control +++ b/debian.py3k/control @@ -1,28 +1,26 @@ Source: logilab-common Section: python Priority: optional -Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> +Maintainer: Logilab S.A. <contact@logilab.fr> Uploaders: David Douard <david.douard@logilab.fr>, Alexandre Fayolle <afayolle@debian.org>, Sandro Tosi <morph@debian.org>, Adrien Di Mascio <Adrien.DiMascio@logilab.fr>, Nicolas Chauvat <nicolas.chauvat@logilab.fr>, Julien Jehannet <julien.jehannet@debian.org>, -Build-Depends: debhelper (>= 5.0.38), python3 -Build-Depends-Indep: python-support, python-epydoc, graphviz, python-egenix-mxdatetime, python-unittest2 -XS-Python-Version: >= 3 +Build-Depends: debhelper (>= 7.0.50~), python3-all +Build-Depends-Indep: python-epydoc, graphviz, python-egenix-mxdatetime, python-unittest2 Standards-Version: 3.9.1 Homepage: http://www.logilab.org/project/logilab-common -Vcs-Svn: svn://svn.debian.org/svn/python-modules/packages/logilab-common/trunk/ -Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/logilab-common/trunk/ +Vcs-Hg: http://hg.logilab.org/logilab/common +Vcs-Browser: http://hg.logilab.org/logilab/common Package: python3-logilab-common Architecture: all Provides: ${python:Provides} Depends: ${python:Depends}, ${misc:Depends} Suggests: pyro, python-unittest2 -#Recommends: # python3-egenix-mxdatetime -Conflicts: python-constraint ( <= 0.3.0-4), python-logilab-astng ( <= 0.16.0-1), pylint ( << 0.11.0-1), devtools ( <= 0.9.0-1), logilab-doctools ( <= 0.1.6-4), python-logilab-aspects ( <= 0.1.4-2), python2.3-logilab-common, python2.4-logilab-common, cubicweb-server ( << 3.6.0-1) +#Recommends: python3-egenix-mxdatetime Description: useful miscellaneous modules used by Logilab projects logilab-common is a collection of low-level Python packages and modules, designed to ease: diff --git a/debian.py3k/rules b/debian.py3k/rules index 4f51761..78e32c5 100755 --- a/debian.py3k/rules +++ b/debian.py3k/rules @@ -5,89 +5,58 @@ # adapted by Logilab for automatic generation by debianize # (part of the devtools project, http://www.logilab.org/projects/devtools) # -# Copyright (c) 2003-2008 LOGILAB S.A. (Paris, FRANCE). +# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PACKAGE:=$(shell grep Package debian/control | cut -d ' ' -f2) +PYDEF:=$(shell py3versions -dv) +include /usr/share/python3/python.mk -include /usr/share/python/python.mk -build: build-stamp - -build-stamp: - dh_testdir +%: + dh --with python3 --without python2 $@ +override_dh_auto_build: # python module build - 2to3-3.1 -wnv -x import setup.py - NO_SETUPTOOLS=1 python3 setup.py -q build --build-purelib build/lib - - # 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 - # use the default python version to select the script dir to run the tests - #XXX PYTHONPATH=$(CURDIR)/build/lib/ python3 $(CURDIR)/build/scripts-$(PYDEF)/pytest -t test -endif - + 2to3-$(PYDEF) -wnv -x import setup.py + NO_SETUPTOOLS=1 python3 setup.py -q build --build-purelib $(CURDIR)/build/lib # build doc $(MAKE) -C doc - rm -f $(CURDIR)/build/lib/logilab/__init__.py - touch build-stamp - - -clean: - dh_testdir - dh_testroot - - # clean doc - $(MAKE) -C doc clean - NO_SETUPTOOLS=1 python setup.py clean - [ ! -d build ] || rm -rf build - find . -name "*.pyc" -delete - dh_clean build-stamp - - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs +override_dh_install: NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \ --root=$(CURDIR)/debian/$(PACKAGE)/ \ ${py_setup_install_args} - find $(CURDIR)/debian/$(PACKAGE)/usr/lib/python*/*-packages/ ! -path "*/test/*py" -name "*py" -exec 2to3-3.1 -wn {} \; - + # transform python2 sources to python3 + find $(CURDIR)/debian/$(PACKAGE)/usr/lib/python*/*-packages/ ! -path "*/test/*py" -name "*py" -exec 2to3-$(PYDEF) -wn {} \; # remove test directory rm -rf debian/$(PACKAGE)/usr/lib/python*/*-packages/logilab/common/test - # dont install pytest for python3k - rm -rf debian/$(PACKAGE)/usr/bin/pytest - - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_install -i - dh_pysupport -i + # rename pytest for python3k + mv debian/$(PACKAGE)/usr/bin/pytest debian/$(PACKAGE)/usr/bin/pytest3 + sed -i 's/python -u/python3 -u/' debian/$(PACKAGE)/usr/bin/pytest3 + # don't install python2.X sources in this package + rm -rf debian/$(PACKAGE)/usr/lib/python2.? + +override_dh_pysupport: + dh_pysupport + dh_python3 -V "$(PYDEF)-" --suggests=python3 + +override_dh_installdocs: + dh_installdocs -i README doc/apidoc/ dh_installchangelogs -i ChangeLog - dh_installexamples -i - dh_installdocs -i README doc/apidoc/ - dh_installman -i - dh_link -i - dh_compress -i -X.py -X.ini -X.xml -Xtest/ -Xapidoc/ - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i -binary-arch: +override_dh_auto_test: +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + # since "logilab.common" is a namespace package, we need to "simulate" it + touch $(CURDIR)/build/lib/logilab/__init__.py + # use the default python version to select the script dir to run the tests + -PYTHONPATH=$(CURDIR)/build/lib/ python3 $(shell unit2) -v -s $(CURDIR)/build/lib/logilab/common/test -p '*test*.py' + rm -f $(CURDIR)/build/lib/logilab/__init__.py +endif -binary: binary-indep -.PHONY: build clean binary binary-indep binary-arch +override_dh_compress: + dh_compress -i -X.py -X.ini -X.xml -Xtest/ -Xapidoc/ |