debian: also build with python3
We build with Python 3 along with Python 2. The binary package will
contain the extension for both python version. This is to ease
transition until the mercurial package in Debian uses Python 3. The
documentation is still built with Python 2 because it needs Mercurial
(which is currently Python 2).
--- a/debian/changelog Fri Oct 18 10:17:53 2019 +0200
+++ b/debian/changelog Fri Oct 11 16:53:52 2019 +0200
@@ -2,6 +2,8 @@
* build with pybuild and sphinxdoc
* update debhelper compat to 10
+ * build with Python 3, keeping Python 2 build until there exists a mercurial
+ package in Debian built with Python 3
-- Denis Laxalde <denis.laxalde@logilab.fr> Tue, 15 Oct 2019 11:41:40 +0200
--- a/debian/control Fri Oct 18 10:17:53 2019 +0200
+++ b/debian/control Fri Oct 11 16:53:52 2019 +0200
@@ -9,6 +9,7 @@
Build-Depends:
mercurial (>= 4.5),
python,
+ python3,
debhelper (>= 10),
dh-python,
python-sphinx (>= 1.0.8),
@@ -17,12 +18,14 @@
wget,
sphinx-common,
X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.6
Homepage: https://www.mercurial-scm.org/doc/evolution/
Package: mercurial-evolve
Architecture: all
Depends:
${python:Depends},
+ ${python3:Depends},
${misc:Depends},
${sphinxdoc:Depends},
mercurial (>= 4.5),
--- a/debian/rules Fri Oct 18 10:17:53 2019 +0200
+++ b/debian/rules Fri Oct 11 16:53:52 2019 +0200
@@ -2,7 +2,7 @@
#export DH_VERBOSE=1
%:
- dh $@ --with python2,sphinxdoc --buildsystem=pybuild
+ dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS)))
override_dh_auto_build:
@@ -25,6 +25,11 @@
find debian -path '*/hgext3rd/__init__.py' -delete
dh_python2
+override_dh_python3:
+ # avoid conflict with mercurial's own hgext3rd/__init__.py
+ find debian -path '*/hgext3rd/__init__.py' -delete
+ dh_python3
+
override_dh_auto_clean: clean-docs
dh_auto_clean
rm -f tests/*.err