summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules21
1 files changed, 18 insertions, 3 deletions
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