From 82ef2326e93d2a0b621dc44974af7279ee42dfb2 Mon Sep 17 00:00:00 2001 From: ben c Date: Wed, 30 Oct 2013 02:48:27 -0200 Subject: add python3 support --- debian/rules | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 706fc3e..f701f6c 100755 --- a/debian/rules +++ b/debian/rules @@ -4,20 +4,25 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -PYVERS := $(shell pyversions -r) +# Prevent setuptools/distribute from accessing the internet. +export http_proxy = http://127.0.0.1:9 export DEB_CFLAGS_MAINT_APPEND = -Wl,-z,relro +PYVERS := $(shell pyversions -r) +PY3VERS = $(shell py3versions -r) + package=python-srp +package3=python3-srp %: - dh $@ --with python2,sphinxdoc --buildsystem=python_distutils + dh $@ --with python2,python3,sphinxdoc --buildsystem=python_distutils override_dh_auto_build: sphinx-build $(CURDIR)/srp/doc $(CURDIR)/srp/doc/build set -ex; \ - for python in $(PYVERS); do \ + for python in $(PYVERS) $(PY3VERS); do \ $$python setup.py build; \ done @@ -28,13 +33,21 @@ override_dh_auto_install: --root debian/$(package)\ --install-layout deb; \ done + set -ex; \ + for python in $(PY3VERS); do \ + $$python setup.py install --skip-build \ + --root debian/$(package3)\ + --install-layout deb; \ + done override_dh_install: dh_install -Xsrp/doc/ override_dh_installdocs: mkdir -p debian/$(package)/usr/share/doc/$(package) + mkdir -p debian/$(package3)/usr/share/doc/$(package3) cp debian/copyright debian/$(package)/usr/share/doc/$(package)/ + cp debian/copyright debian/$(package3)/usr/share/doc/$(package3)/ override_dh_sphinxdoc: cp -r srp/doc/build/* debian/$(package)/usr/share/doc/$(package)/ @@ -44,3 +57,5 @@ override_dh_auto_clean: dh_auto_clean rm -rf srp/doc/build rm -rf build + rm -rf *.egg-info + find \( -name '._*' -o -name '*.pyc' \) -delete -- cgit v1.2.3