##// END OF EJS Templates
packaging: upgrade Debian packaging to build with Python 3...
Denis Laxalde -
r44000:7574ccd8 stable
parent child Browse files
Show More
@@ -7,20 +7,19 b' Build-Depends:'
7 dh-python,
7 dh-python,
8 less,
8 less,
9 netbase,
9 netbase,
10 python-all,
10 python3-all,
11 python-all-dev,
11 python3-all-dev,
12 python-docutils,
12 python3-docutils,
13 unzip,
13 unzip,
14 zip
14 zip
15 Standards-Version: 3.9.4
15 Standards-Version: 3.9.4
16 X-Python-Version: >= 2.7
16 X-Python3-Version: >= 3.5
17
17
18 Package: mercurial
18 Package: mercurial
19 Depends:
19 Depends:
20 python,
21 ${shlibs:Depends},
20 ${shlibs:Depends},
22 ${misc:Depends},
21 ${misc:Depends},
23 ${python:Depends},
22 ${python3:Depends},
24 mercurial-common (= ${source:Version})
23 mercurial-common (= ${source:Version})
25 Architecture: any
24 Architecture: any
26 Description: fast, easy to use, distributed revision control tool.
25 Description: fast, easy to use, distributed revision control tool.
@@ -41,7 +40,7 b' Package: mercurial-common'
41 Architecture: all
40 Architecture: all
42 Depends:
41 Depends:
43 ${misc:Depends},
42 ${misc:Depends},
44 ${python:Depends},
43 ${python3:Depends},
45 Recommends: mercurial (= ${source:Version}), ca-certificates
44 Recommends: mercurial (= ${source:Version}), ca-certificates
46 Suggests: wish
45 Suggests: wish
47 Breaks: mercurial (<< ${source:Version})
46 Breaks: mercurial (<< ${source:Version})
@@ -4,18 +4,21 b''
4
4
5 CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
5 CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
6
6
7 export HGPYTHON3=1
8 export PYTHON=python3
9
7 %:
10 %:
8 dh $@ --with python2
11 dh $@ --with python3
9
12
10 override_dh_auto_test:
13 override_dh_auto_test:
11 http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
14 http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
12
15
13 override_dh_python2:
16 override_dh_python3:
14 dh_python2
17 dh_python3
15 find debian/mercurial/usr/share -type d -empty -delete
18 find debian/mercurial/usr/share -type d -empty -delete
16
19
17 override_dh_install:
20 override_dh_install:
18 python$(PYVERS) setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
21 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
19 # chg
22 # chg
20 make -C contrib/chg \
23 make -C contrib/chg \
21 DESTDIR="$(CURDIR)"/debian/mercurial \
24 DESTDIR="$(CURDIR)"/debian/mercurial \
@@ -25,7 +28,7 b' override_dh_install:'
25 find "$(CURDIR)"/debian/mercurial/usr/lib \
28 find "$(CURDIR)"/debian/mercurial/usr/lib \
26 ! -name '*.so' ! -type d -delete , \
29 ! -name '*.so' ! -type d -delete , \
27 -type d -empty -delete
30 -type d -empty -delete
28 python$(PYVERS) setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
31 python3 setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
29 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
32 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
30 # remove arch-dependent python stuff
33 # remove arch-dependent python stuff
31 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
34 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
@@ -17,10 +17,10 b" Ensure debuild doesn't run the testsuite"
17 mercurial_*.deb (glob)
17 mercurial_*.deb (glob)
18 main deb should have .so but no .py
18 main deb should have .so but no .py
19 $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)'
19 $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)'
20 * ./usr/lib/python2.7/dist-packages/mercurial/cext/parsers*.so (glob)
20 * ./usr/lib/python3/dist-packages/mercurial/cext/parsers*.so (glob)
21 mercurial-common should have py but no .so or pyc
21 mercurial-common should have py but no .so or pyc
22 $ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers.*so)'
22 $ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers.*so)'
23 * ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob)
23 * ./usr/lib/python3/dist-packages/mercurial/localrepo.py (glob)
24 zsh completions should be in the common package
24 zsh completions should be in the common package
25 $ dpkg --contents mercurial-common_*.deb | egrep 'zsh.*[^/]$'
25 $ dpkg --contents mercurial-common_*.deb | egrep 'zsh.*[^/]$'
26 * ./usr/share/zsh/vendor-completions/_hg (glob)
26 * ./usr/share/zsh/vendor-completions/_hg (glob)
General Comments 0
You need to be logged in to leave comments. Login now