1 |
commit: fd6500f8df38110bad49b24e18d45f69bcb5839d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 11 14:36:43 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 11 14:58:39 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd6500f8 |
7 |
|
8 |
dev-python/setuptools_scm: Bump to 3.1.0 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/setuptools_scm/Manifest | 1 + |
13 |
.../files/setuptools_scm-3.1.0-test-failures.patch | 105 +++++++++++++++++++++ |
14 |
.../setuptools_scm/setuptools_scm-3.1.0.ebuild | 43 +++++++++ |
15 |
3 files changed, 149 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/setuptools_scm/Manifest b/dev-python/setuptools_scm/Manifest |
18 |
index e0e4caed9fd..bee0350f7c7 100644 |
19 |
--- a/dev-python/setuptools_scm/Manifest |
20 |
+++ b/dev-python/setuptools_scm/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST setuptools_scm-1.15.6.tar.gz 25779 BLAKE2B 01d6771c24015f072a46ff1429b96413 |
22 |
DIST setuptools_scm-1.15.7.tar.gz 15426 BLAKE2B 6c23f2bd74f51ec8633a814ce22e63e5afb9953244659833a61e810c9029227e1cc25a067a59cec5666add76863070ae5b7dc2600953a45def886e52378a3399 SHA512 0aa6056c03fe100cdaa7b11c9d2073431bb5c3904a80a994a8263c0ccac81f7a2c0b6c7e6dfd09ad605c5ff0e86981b894b42920cb69d1ef1d43ea08b2ddd4a0 |
23 |
DIST setuptools_scm-1.16.1.tar.gz 28956 BLAKE2B 6721830e9ef171768afb94e6d6aacb829665658599409880e87c58e1bf2c6366d04a666ff60ed5d689bf376c258eda93367a4c52fe28ec694a3a93ac109db1fb SHA512 fd5017648c4a8af696e8528eab37061776e8495e2de3640f726e5e4347836eca5a13cbe54fc0c2223c3ae80ede1a81a6f3d9c0910a417545b9f9f206e5177a13 |
24 |
DIST setuptools_scm-2.1.0.tar.gz 32776 BLAKE2B 7a141f3fa826a82931b6c33afd19d3185f98b735451c03651b875051e514eab287b20ee382a9576841b6f1283b9d1bf3dcbd0aabc41d2f1143cf960b856c8492 SHA512 69ce171aa4d3b576883efffb350c59f38bfe8b35bd8e4e8fa1128d9f8a3e6cfaab832633e91fada36126f8e7e2c18663fad621d62c9834be1b5d36c58ae1d1c8 |
25 |
+DIST setuptools_scm-3.1.0.tar.gz 35585 BLAKE2B 7ecbdf325467cb3e5217150c548b99603e1bb851a3bc8c694acf3aeb0da798ec853d13b29ad0537bdf5c1010834576786e0dde3965d61991554a12cf206ba7e0 SHA512 bd84bb02900ddc7de2f02dd7cb62bafdea7040ebdc2506b72d05f2c6a6d16be903321e576f63a04f2aa13d8c75b1834dec7d9ea8444e8330281f8e586a3d6426 |
26 |
|
27 |
diff --git a/dev-python/setuptools_scm/files/setuptools_scm-3.1.0-test-failures.patch b/dev-python/setuptools_scm/files/setuptools_scm-3.1.0-test-failures.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..420bd6828b4 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/setuptools_scm/files/setuptools_scm-3.1.0-test-failures.patch |
32 |
@@ -0,0 +1,105 @@ |
33 |
+diff --git a/src/setuptools_scm/hg.py b/src/setuptools_scm/hg.py |
34 |
+index 972f493..8fedd68 100644 |
35 |
+--- a/src/setuptools_scm/hg.py |
36 |
++++ b/src/setuptools_scm/hg.py |
37 |
+@@ -13,7 +13,7 @@ def _hg_tagdist_normalize_tagcommit(config, tag, dist, node, branch): |
38 |
+ "(branch(.)" # look for revisions in this branch only |
39 |
+ " and tag({tag!r})::." # after the last tag |
40 |
+ # ignore commits that only modify .hgtags and nothing else: |
41 |
+- " and (merge() or file('re:^(?!\.hgtags).*$'))" |
42 |
++ " and (merge() or file('re:^(?!\\.hgtags).*$'))" |
43 |
+ " and not tag({tag!r}))" # ignore the tagged commit itself |
44 |
+ ).format( |
45 |
+ tag=tag |
46 |
+@@ -70,7 +70,9 @@ def parse(root, config=None): |
47 |
+ |
48 |
+ def get_latest_normalizable_tag(root): |
49 |
+ # Gets all tags containing a '.' (see #229) from oldest to newest |
50 |
+- cmd = ["hg", "log", "-r", "ancestors(.) and tag('re:\.')", "--template", "{tags}\n"] |
51 |
++ cmd = [ |
52 |
++ "hg", "log", "-r", "ancestors(.) and tag('re:\\.')", "--template", "{tags}\n" |
53 |
++ ] |
54 |
+ outlines = do(cmd, root).split() |
55 |
+ if not outlines: |
56 |
+ return "null" |
57 |
+diff --git a/testing/test_functions.py b/testing/test_functions.py |
58 |
+index 14d8961..c3d78b6 100644 |
59 |
+--- a/testing/test_functions.py |
60 |
++++ b/testing/test_functions.py |
61 |
+@@ -8,6 +8,8 @@ from setuptools_scm.version import ( |
62 |
+ format_version, |
63 |
+ tag_to_version, |
64 |
+ ) |
65 |
++ |
66 |
++from setuptools_scm.config import Configuration |
67 |
+ from setuptools_scm.utils import has_command |
68 |
+ |
69 |
+ PY3 = sys.version_info > (2,) |
70 |
+@@ -33,12 +35,14 @@ def test_next_tag(tag, expected): |
71 |
+ assert guess_next_version(version) == expected |
72 |
+ |
73 |
+ |
74 |
++c = Configuration() |
75 |
++ |
76 |
+ VERSIONS = { |
77 |
+- "exact": meta("1.1", distance=None, dirty=False), |
78 |
+- "zerodistance": meta("1.1", distance=0, dirty=False), |
79 |
+- "dirty": meta("1.1", distance=None, dirty=True), |
80 |
+- "distance": meta("1.1", distance=3, dirty=False), |
81 |
+- "distancedirty": meta("1.1", distance=3, dirty=True), |
82 |
++ "exact": meta("1.1", distance=None, dirty=False, config=c), |
83 |
++ "zerodistance": meta("1.1", distance=0, dirty=False, config=c), |
84 |
++ "dirty": meta("1.1", distance=None, dirty=True, config=c), |
85 |
++ "distance": meta("1.1", distance=3, dirty=False, config=c), |
86 |
++ "distancedirty": meta("1.1", distance=3, dirty=True, config=c), |
87 |
+ } |
88 |
+ |
89 |
+ |
90 |
+diff --git a/testing/test_version.py b/testing/test_version.py |
91 |
+index be940ef..a287a0d 100644 |
92 |
+--- a/testing/test_version.py |
93 |
++++ b/testing/test_version.py |
94 |
+@@ -3,33 +3,36 @@ from setuptools_scm.config import Configuration |
95 |
+ from setuptools_scm.version import meta, simplified_semver_version, tags_to_versions |
96 |
+ |
97 |
+ |
98 |
++c = Configuration() |
99 |
++ |
100 |
++ |
101 |
+ @pytest.mark.parametrize( |
102 |
+ "version, expected_next", |
103 |
+ [ |
104 |
+- pytest.param(meta("1.0.0"), "1.0.0", id="exact"), |
105 |
+- pytest.param(meta("1.0"), "1.0.0", id="short_tag"), |
106 |
++ pytest.param(meta("1.0.0", config=c), "1.0.0", id="exact"), |
107 |
++ pytest.param(meta("1.0", config=c), "1.0.0", id="short_tag"), |
108 |
+ pytest.param( |
109 |
+- meta("1.0.0", distance=2, branch="default"), |
110 |
++ meta("1.0.0", distance=2, branch="default", config=c), |
111 |
+ "1.0.1.dev2", |
112 |
+ id="normal_branch", |
113 |
+ ), |
114 |
+ pytest.param( |
115 |
+- meta("1.0", distance=2, branch="default"), |
116 |
++ meta("1.0", distance=2, branch="default", config=c), |
117 |
+ "1.0.1.dev2", |
118 |
+ id="normal_branch_short_tag", |
119 |
+ ), |
120 |
+ pytest.param( |
121 |
+- meta("1.0.0", distance=2, branch="feature"), |
122 |
++ meta("1.0.0", distance=2, branch="feature", config=c), |
123 |
+ "1.1.0.dev2", |
124 |
+ id="feature_branch", |
125 |
+ ), |
126 |
+ pytest.param( |
127 |
+- meta("1.0", distance=2, branch="feature"), |
128 |
++ meta("1.0", distance=2, branch="feature", config=c), |
129 |
+ "1.1.0.dev2", |
130 |
+ id="feature_branch_short_tag", |
131 |
+ ), |
132 |
+ pytest.param( |
133 |
+- meta("1.0.0", distance=2, branch="features/test"), |
134 |
++ meta("1.0.0", distance=2, branch="features/test", config=c), |
135 |
+ "1.1.0.dev2", |
136 |
+ id="feature_in_branch", |
137 |
+ ), |
138 |
|
139 |
diff --git a/dev-python/setuptools_scm/setuptools_scm-3.1.0.ebuild b/dev-python/setuptools_scm/setuptools_scm-3.1.0.ebuild |
140 |
new file mode 100644 |
141 |
index 00000000000..6756febef56 |
142 |
--- /dev/null |
143 |
+++ b/dev-python/setuptools_scm/setuptools_scm-3.1.0.ebuild |
144 |
@@ -0,0 +1,43 @@ |
145 |
+# Copyright 1999-2019 Gentoo Authors |
146 |
+# Distributed under the terms of the GNU General Public License v2 |
147 |
+ |
148 |
+EAPI=6 |
149 |
+ |
150 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy pypy3 ) |
151 |
+ |
152 |
+inherit distutils-r1 |
153 |
+ |
154 |
+DESCRIPTION="package to manage versions by scm tags via setuptools" |
155 |
+HOMEPAGE="https://github.com/pypa/setuptools_scm https://pypi.org/project/setuptools_scm/" |
156 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
157 |
+ |
158 |
+LICENSE="MIT" |
159 |
+SLOT="0" |
160 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
161 |
+IUSE="test" |
162 |
+RESTRICT="!test? ( test )" |
163 |
+ |
164 |
+DEPEND=" |
165 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
166 |
+ test? ( |
167 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
168 |
+ dev-vcs/git |
169 |
+ dev-vcs/mercurial )" |
170 |
+ |
171 |
+python_prepare_all() { |
172 |
+ local PATCHES=( |
173 |
+ "${FILESDIR}"/setuptools_scm-3.1.0-test-failures.patch |
174 |
+ ) |
175 |
+ |
176 |
+ # network access |
177 |
+ sed -i -e 's:test_pip_download:_&:' testing/test_regressions.py || die |
178 |
+ # all fetch specific setuptools versions |
179 |
+ rm testing/test_setuptools_support.py || die |
180 |
+ |
181 |
+ distutils-r1_python_prepare_all |
182 |
+} |
183 |
+ |
184 |
+python_test() { |
185 |
+ distutils_install_for_testing |
186 |
+ py.test -v -v -x || die "Tests fail with ${EPYTHON}" |
187 |
+} |