Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/tortoisehg/
Date: Sun, 30 May 2021 09:53:09
Message-Id: 1622368375.64ef96bc67f5033124d34df1329775cb09065203.sam@gentoo
1 commit: 64ef96bc67f5033124d34df1329775cb09065203
2 Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
3 AuthorDate: Wed May 12 20:35:29 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun May 30 09:52:55 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64ef96bc
7
8 dev-vcs/tortoisehg: 5.8 version bump; 9999.ebuild update
9
10 Since tarball from 'https://www.mercurial-scm.org/release/tortoisehg/targz/'
11 doesn't provide 'tests' directory the SRC_URI is replaced with url
12 for upstream repository 'https://foss.heptapod.net/mercurial/tortoisehg/'
13 like as for 9999.ebuild is curretly used.
14
15 This allows to add USE="test" both for 5.8 and 9999 ebuilds
16 with conditional DEPEND="dev-python/mock dev-python/pytest"
17 and appropriate calls for tests run in python_test() phase.
18
19 Additionally the QA issue is fixed:
20 "The ebuild is installing to one or more unexpected paths:
21 /usr/share/doc/tortoisehg
22 Please fix the ebuild to use correct FHS/Gentoo policy paths."
23 for "COPYING.txt" file installation by patching 'setup.py'
24 within python_prepare_all() phase.
25
26 New runtime dependency 'dev-python/pygit2' for the core git extension support
27 is added via optfeature call.
28
29 Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
30 Closes: https://github.com/gentoo/gentoo/pull/20788
31 Signed-off-by: Sam James <sam <AT> gentoo.org>
32
33 dev-vcs/tortoisehg/Manifest | 1 +
34 ...ortoisehg-9999.ebuild => tortoisehg-5.8.ebuild} | 32 +++++++++++++++++-----
35 dev-vcs/tortoisehg/tortoisehg-9999.ebuild | 32 +++++++++++++++++-----
36 3 files changed, 51 insertions(+), 14 deletions(-)
37
38 diff --git a/dev-vcs/tortoisehg/Manifest b/dev-vcs/tortoisehg/Manifest
39 index e9ead221698..2c89d8773a5 100644
40 --- a/dev-vcs/tortoisehg/Manifest
41 +++ b/dev-vcs/tortoisehg/Manifest
42 @@ -1 +1,2 @@
43 DIST tortoisehg-5.7.tar.gz 8910721 BLAKE2B ebca9526fc39c94c26f28db6dd70527c528308d9003fca0d9cfb61f984a9a5d80f910d68d0d1449221bbb4e040d2919ed34fec1e0aee4d9f5ed55cbcdb8ba714 SHA512 d143c9e83d3b0771ffd4a3bd9cd50e8bc169e5d29e33a0681c3234898a7566427f070ff3ad8668709b5e4d63be92fd700211dee03e98ff16c7c23fc0870c9e4c
44 +DIST tortoisehg-5.8.tar.gz 8636455 BLAKE2B 1f4171ca4eb465aabacaf53b97785c5f05fc501a11329af008695f706d8d2cb9c5eee5e64bb5a60fdf7234f33ed6a937dfacce49cb36ac9e9b8505be271b4f35 SHA512 b9fe80a98cfafe0dbc90be5fe6f83b466fe596b4ec135d0eacc5618e39c0249a3a352bed640a7cecb99d53eaf60908d60d7748009492cbd8202fc191ef428278
45
46 diff --git a/dev-vcs/tortoisehg/tortoisehg-9999.ebuild b/dev-vcs/tortoisehg/tortoisehg-5.8.ebuild
47 similarity index 62%
48 copy from dev-vcs/tortoisehg/tortoisehg-9999.ebuild
49 copy to dev-vcs/tortoisehg/tortoisehg-5.8.ebuild
50 index 439a13c2c81..f54b981fe3d 100644
51 --- a/dev-vcs/tortoisehg/tortoisehg-9999.ebuild
52 +++ b/dev-vcs/tortoisehg/tortoisehg-5.8.ebuild
53 @@ -6,18 +6,19 @@ PYTHON_COMPAT=( python3_{7..9} )
54
55 DISTUTILS_USE_SETUPTOOLS=no
56
57 -inherit desktop distutils-r1 xdg-utils
58 +inherit desktop distutils-r1 optfeature xdg-utils
59
60 if [[ ${PV} != *9999* ]]; then
61 KEYWORDS="~amd64 ~arm64 ~x86"
62 - SRC_URI="https://www.mercurial-scm.org/release/tortoisehg/targz/${P}.tar.gz"
63 - HG_DEPEND=">=dev-vcs/mercurial-5.6[${PYTHON_USEDEP}]
64 - <dev-vcs/mercurial-5.8[${PYTHON_USEDEP}]"
65 + SRC_URI="https://foss.heptapod.net/mercurial/${PN}/thg/-/archive/${PV}/thg-${PV}.tar.gz -> ${P}.tar.gz"
66 + HG_DEPEND=">=dev-vcs/mercurial-5.7[${PYTHON_USEDEP}]
67 + <dev-vcs/mercurial-5.9[${PYTHON_USEDEP}]"
68 + S="${WORKDIR}/thg-${PV}"
69 else
70 inherit mercurial
71 - EHG_REPO_URI="https://foss.heptapod.net/mercurial/tortoisehg/thg"
72 + EHG_REPO_URI="https://foss.heptapod.net/mercurial/${PN}/thg"
73 EHG_REVISION="stable"
74 - HG_DEPEND=">=dev-vcs/mercurial-5.6[${PYTHON_USEDEP}]"
75 + HG_DEPEND=">=dev-vcs/mercurial-5.7[${PYTHON_USEDEP}]"
76 fi
77
78 DESCRIPTION="Set of graphical tools for Mercurial"
79 @@ -25,6 +26,8 @@ HOMEPAGE="https://tortoisehg.bitbucket.io/"
80
81 LICENSE="GPL-2"
82 SLOT="0"
83 +IUSE="test"
84 +RESTRICT="!test? ( test )"
85
86 RDEPEND="
87 ${HG_DEPEND}
88 @@ -33,16 +36,29 @@ RDEPEND="
89 dev-python/PyQt5[network,svg,${PYTHON_USEDEP}]
90 >=dev-python/qscintilla-python-2.9.4[qt5(+),${PYTHON_USEDEP}]
91 "
92 -DEPEND="${RDEPEND}"
93 +DEPEND="
94 + ${RDEPEND}
95 + test? (
96 + dev-python/mock
97 + dev-python/pytest
98 + )
99 +"
100
101 distutils_enable_sphinx doc/source
102
103 python_prepare_all() {
104 # Remove file that collides with >=mercurial-4.0 (bug #599266).
105 rm "${S}"/hgext3rd/__init__.py || die "can't remove /hgext3rd/__init__.py"
106 +
107 + sed -i -e 's:share/doc/tortoisehg:share/doc/'"${PF}"':' setup.py || die
108 distutils-r1_python_prepare_all
109 }
110
111 +python_test() {
112 + ${EPYTHON} tests/run-tests.py -m 'not largefiles' --doctest-modules tests || die
113 + ${EPYTHON} tests/run-tests.py -m largefiles tests || die
114 +}
115 +
116 python_install_all() {
117 distutils-r1_python_install_all
118 dodoc doc/ReadMe*.txt doc/TODO contrib/mergetools.rc
119 @@ -55,6 +71,8 @@ pkg_postinst() {
120 elog "When startup of ${PN} fails with an API version mismatch error"
121 elog "between dev-python/sip and dev-python/PyQt5 please rebuild"
122 elog "dev-python/qscintilla-python."
123 +
124 + optfeature "the core git extension support" dev-python/pygit2
125 }
126
127 pkg_postrm() {
128
129 diff --git a/dev-vcs/tortoisehg/tortoisehg-9999.ebuild b/dev-vcs/tortoisehg/tortoisehg-9999.ebuild
130 index 439a13c2c81..f54b981fe3d 100644
131 --- a/dev-vcs/tortoisehg/tortoisehg-9999.ebuild
132 +++ b/dev-vcs/tortoisehg/tortoisehg-9999.ebuild
133 @@ -6,18 +6,19 @@ PYTHON_COMPAT=( python3_{7..9} )
134
135 DISTUTILS_USE_SETUPTOOLS=no
136
137 -inherit desktop distutils-r1 xdg-utils
138 +inherit desktop distutils-r1 optfeature xdg-utils
139
140 if [[ ${PV} != *9999* ]]; then
141 KEYWORDS="~amd64 ~arm64 ~x86"
142 - SRC_URI="https://www.mercurial-scm.org/release/tortoisehg/targz/${P}.tar.gz"
143 - HG_DEPEND=">=dev-vcs/mercurial-5.6[${PYTHON_USEDEP}]
144 - <dev-vcs/mercurial-5.8[${PYTHON_USEDEP}]"
145 + SRC_URI="https://foss.heptapod.net/mercurial/${PN}/thg/-/archive/${PV}/thg-${PV}.tar.gz -> ${P}.tar.gz"
146 + HG_DEPEND=">=dev-vcs/mercurial-5.7[${PYTHON_USEDEP}]
147 + <dev-vcs/mercurial-5.9[${PYTHON_USEDEP}]"
148 + S="${WORKDIR}/thg-${PV}"
149 else
150 inherit mercurial
151 - EHG_REPO_URI="https://foss.heptapod.net/mercurial/tortoisehg/thg"
152 + EHG_REPO_URI="https://foss.heptapod.net/mercurial/${PN}/thg"
153 EHG_REVISION="stable"
154 - HG_DEPEND=">=dev-vcs/mercurial-5.6[${PYTHON_USEDEP}]"
155 + HG_DEPEND=">=dev-vcs/mercurial-5.7[${PYTHON_USEDEP}]"
156 fi
157
158 DESCRIPTION="Set of graphical tools for Mercurial"
159 @@ -25,6 +26,8 @@ HOMEPAGE="https://tortoisehg.bitbucket.io/"
160
161 LICENSE="GPL-2"
162 SLOT="0"
163 +IUSE="test"
164 +RESTRICT="!test? ( test )"
165
166 RDEPEND="
167 ${HG_DEPEND}
168 @@ -33,16 +36,29 @@ RDEPEND="
169 dev-python/PyQt5[network,svg,${PYTHON_USEDEP}]
170 >=dev-python/qscintilla-python-2.9.4[qt5(+),${PYTHON_USEDEP}]
171 "
172 -DEPEND="${RDEPEND}"
173 +DEPEND="
174 + ${RDEPEND}
175 + test? (
176 + dev-python/mock
177 + dev-python/pytest
178 + )
179 +"
180
181 distutils_enable_sphinx doc/source
182
183 python_prepare_all() {
184 # Remove file that collides with >=mercurial-4.0 (bug #599266).
185 rm "${S}"/hgext3rd/__init__.py || die "can't remove /hgext3rd/__init__.py"
186 +
187 + sed -i -e 's:share/doc/tortoisehg:share/doc/'"${PF}"':' setup.py || die
188 distutils-r1_python_prepare_all
189 }
190
191 +python_test() {
192 + ${EPYTHON} tests/run-tests.py -m 'not largefiles' --doctest-modules tests || die
193 + ${EPYTHON} tests/run-tests.py -m largefiles tests || die
194 +}
195 +
196 python_install_all() {
197 distutils-r1_python_install_all
198 dodoc doc/ReadMe*.txt doc/TODO contrib/mergetools.rc
199 @@ -55,6 +71,8 @@ pkg_postinst() {
200 elog "When startup of ${PN} fails with an API version mismatch error"
201 elog "between dev-python/sip and dev-python/PyQt5 please rebuild"
202 elog "dev-python/qscintilla-python."
203 +
204 + optfeature "the core git extension support" dev-python/pygit2
205 }
206
207 pkg_postrm() {