##// END OF EJS Templates
packaging: upgrade Debian packaging to build with Python 3...
Denis Laxalde -
r44000:7574ccd8 stable
parent child Browse files
Show More
@@ -1,54 +1,53 b''
1 1 Source: mercurial
2 2 Section: vcs
3 3 Priority: optional
4 4 Maintainer: Mercurial Developers <mercurial-devel@mercurial-scm.org>
5 5 Build-Depends:
6 6 debhelper (>= 9),
7 7 dh-python,
8 8 less,
9 9 netbase,
10 python-all,
11 python-all-dev,
12 python-docutils,
10 python3-all,
11 python3-all-dev,
12 python3-docutils,
13 13 unzip,
14 14 zip
15 15 Standards-Version: 3.9.4
16 X-Python-Version: >= 2.7
16 X-Python3-Version: >= 3.5
17 17
18 18 Package: mercurial
19 19 Depends:
20 python,
21 20 ${shlibs:Depends},
22 21 ${misc:Depends},
23 ${python:Depends},
22 ${python3:Depends},
24 23 mercurial-common (= ${source:Version})
25 24 Architecture: any
26 25 Description: fast, easy to use, distributed revision control tool.
27 26 Mercurial is a fast, lightweight Source Control Management system designed
28 27 for efficient handling of very large distributed projects.
29 28 .
30 29 Its features include:
31 30 * O(1) delta-compressed file storage and retrieval scheme
32 31 * Complete cross-indexing of files and changesets for efficient exploration
33 32 of project history
34 33 * Robust SHA1-based integrity checking and append-only storage model
35 34 * Decentralized development model with arbitrary merging between trees
36 35 * Easy-to-use command-line interface
37 36 * Integrated stand-alone web interface
38 37 * Small Python codebase
39 38
40 39 Package: mercurial-common
41 40 Architecture: all
42 41 Depends:
43 42 ${misc:Depends},
44 ${python:Depends},
43 ${python3:Depends},
45 44 Recommends: mercurial (= ${source:Version}), ca-certificates
46 45 Suggests: wish
47 46 Breaks: mercurial (<< ${source:Version})
48 47 Replaces: mercurial (<< 2.6.3)
49 48 Description: easy-to-use, scalable distributed version control system (common files)
50 49 Mercurial is a fast, lightweight Source Control Management system designed
51 50 for efficient handling of very large distributed projects.
52 51 .
53 52 This package contains the architecture independent components of Mercurial,
54 53 and is generally useless without the mercurial package.
@@ -1,44 +1,47 b''
1 1 #!/usr/bin/make -f
2 2 # Uncomment this to turn on verbose mode.
3 3 # export DH_VERBOSE=1
4 4
5 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 13 override_dh_auto_test:
11 14 http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
12 15
13 override_dh_python2:
14 dh_python2
16 override_dh_python3:
17 dh_python3
15 18 find debian/mercurial/usr/share -type d -empty -delete
16 19
17 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 22 # chg
20 23 make -C contrib/chg \
21 24 DESTDIR="$(CURDIR)"/debian/mercurial \
22 25 PREFIX=/usr \
23 26 clean install
24 27 # remove arch-independent python stuff
25 28 find "$(CURDIR)"/debian/mercurial/usr/lib \
26 29 ! -name '*.so' ! -type d -delete , \
27 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 32 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
30 33 # remove arch-dependent python stuff
31 34 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
32 35 -name '*.so' ! -type d -delete , \
33 36 -type d -empty -delete
34 37 cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
35 38 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
36 39 cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
37 40 mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
38 41 cp contrib/packaging/debian/*.rc "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
39 42 # completions
40 43 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
41 44 cp contrib/bash_completion "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions/hg
42 45 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
43 46 cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
44 47 rm "$(CURDIR)"/debian/mercurial-common/usr/bin/hg
@@ -1,32 +1,32 b''
1 1 #require test-repo slow debhelper debdeps
2 2
3 3 $ . "$TESTDIR/helpers-testrepo.sh"
4 4 $ testrepohgenv
5 5
6 6 Ensure debuild doesn't run the testsuite, as that could get silly.
7 7 $ DEB_BUILD_OPTIONS=nocheck
8 8 $ export DEB_BUILD_OPTIONS
9 9 $ OUTPUTDIR=`pwd`
10 10 $ export OUTPUTDIR
11 11
12 12 $ cd "$TESTDIR"/..
13 13 $ make deb > $OUTPUTDIR/build.log 2>&1
14 14 $ cd $OUTPUTDIR
15 15 $ ls *.deb | grep -v 'dbg'
16 16 mercurial-common_*.deb (glob)
17 17 mercurial_*.deb (glob)
18 18 main deb should have .so but no .py
19 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 21 mercurial-common should have py but no .so or pyc
22 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 24 zsh completions should be in the common package
25 25 $ dpkg --contents mercurial-common_*.deb | egrep 'zsh.*[^/]$'
26 26 * ./usr/share/zsh/vendor-completions/_hg (glob)
27 27 chg should be installed alongside hg, in the 'mercurial' package
28 28 $ dpkg --contents mercurial_*.deb | egrep 'chg$'
29 29 * ./usr/bin/chg (glob)
30 30 chg should come with a man page
31 31 $ dpkg --contents mercurial_*.deb | egrep 'man.*chg'
32 32 * ./usr/share/man/man1/chg.1.gz (glob)
General Comments 0
You need to be logged in to leave comments. Login now