mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-python/setuptools_scm: Bump to 3.1.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -2,3 +2,4 @@ DIST setuptools_scm-1.15.6.tar.gz 25779 BLAKE2B 01d6771c24015f072a46ff1429b96413
|
||||
DIST setuptools_scm-1.15.7.tar.gz 15426 BLAKE2B 6c23f2bd74f51ec8633a814ce22e63e5afb9953244659833a61e810c9029227e1cc25a067a59cec5666add76863070ae5b7dc2600953a45def886e52378a3399 SHA512 0aa6056c03fe100cdaa7b11c9d2073431bb5c3904a80a994a8263c0ccac81f7a2c0b6c7e6dfd09ad605c5ff0e86981b894b42920cb69d1ef1d43ea08b2ddd4a0
|
||||
DIST setuptools_scm-1.16.1.tar.gz 28956 BLAKE2B 6721830e9ef171768afb94e6d6aacb829665658599409880e87c58e1bf2c6366d04a666ff60ed5d689bf376c258eda93367a4c52fe28ec694a3a93ac109db1fb SHA512 fd5017648c4a8af696e8528eab37061776e8495e2de3640f726e5e4347836eca5a13cbe54fc0c2223c3ae80ede1a81a6f3d9c0910a417545b9f9f206e5177a13
|
||||
DIST setuptools_scm-2.1.0.tar.gz 32776 BLAKE2B 7a141f3fa826a82931b6c33afd19d3185f98b735451c03651b875051e514eab287b20ee382a9576841b6f1283b9d1bf3dcbd0aabc41d2f1143cf960b856c8492 SHA512 69ce171aa4d3b576883efffb350c59f38bfe8b35bd8e4e8fa1128d9f8a3e6cfaab832633e91fada36126f8e7e2c18663fad621d62c9834be1b5d36c58ae1d1c8
|
||||
DIST setuptools_scm-3.1.0.tar.gz 35585 BLAKE2B 7ecbdf325467cb3e5217150c548b99603e1bb851a3bc8c694acf3aeb0da798ec853d13b29ad0537bdf5c1010834576786e0dde3965d61991554a12cf206ba7e0 SHA512 bd84bb02900ddc7de2f02dd7cb62bafdea7040ebdc2506b72d05f2c6a6d16be903321e576f63a04f2aa13d8c75b1834dec7d9ea8444e8330281f8e586a3d6426
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
diff --git a/src/setuptools_scm/hg.py b/src/setuptools_scm/hg.py
|
||||
index 972f493..8fedd68 100644
|
||||
--- a/src/setuptools_scm/hg.py
|
||||
+++ b/src/setuptools_scm/hg.py
|
||||
@@ -13,7 +13,7 @@ def _hg_tagdist_normalize_tagcommit(config, tag, dist, node, branch):
|
||||
"(branch(.)" # look for revisions in this branch only
|
||||
" and tag({tag!r})::." # after the last tag
|
||||
# ignore commits that only modify .hgtags and nothing else:
|
||||
- " and (merge() or file('re:^(?!\.hgtags).*$'))"
|
||||
+ " and (merge() or file('re:^(?!\\.hgtags).*$'))"
|
||||
" and not tag({tag!r}))" # ignore the tagged commit itself
|
||||
).format(
|
||||
tag=tag
|
||||
@@ -70,7 +70,9 @@ def parse(root, config=None):
|
||||
|
||||
def get_latest_normalizable_tag(root):
|
||||
# Gets all tags containing a '.' (see #229) from oldest to newest
|
||||
- cmd = ["hg", "log", "-r", "ancestors(.) and tag('re:\.')", "--template", "{tags}\n"]
|
||||
+ cmd = [
|
||||
+ "hg", "log", "-r", "ancestors(.) and tag('re:\\.')", "--template", "{tags}\n"
|
||||
+ ]
|
||||
outlines = do(cmd, root).split()
|
||||
if not outlines:
|
||||
return "null"
|
||||
diff --git a/testing/test_functions.py b/testing/test_functions.py
|
||||
index 14d8961..c3d78b6 100644
|
||||
--- a/testing/test_functions.py
|
||||
+++ b/testing/test_functions.py
|
||||
@@ -8,6 +8,8 @@ from setuptools_scm.version import (
|
||||
format_version,
|
||||
tag_to_version,
|
||||
)
|
||||
+
|
||||
+from setuptools_scm.config import Configuration
|
||||
from setuptools_scm.utils import has_command
|
||||
|
||||
PY3 = sys.version_info > (2,)
|
||||
@@ -33,12 +35,14 @@ def test_next_tag(tag, expected):
|
||||
assert guess_next_version(version) == expected
|
||||
|
||||
|
||||
+c = Configuration()
|
||||
+
|
||||
VERSIONS = {
|
||||
- "exact": meta("1.1", distance=None, dirty=False),
|
||||
- "zerodistance": meta("1.1", distance=0, dirty=False),
|
||||
- "dirty": meta("1.1", distance=None, dirty=True),
|
||||
- "distance": meta("1.1", distance=3, dirty=False),
|
||||
- "distancedirty": meta("1.1", distance=3, dirty=True),
|
||||
+ "exact": meta("1.1", distance=None, dirty=False, config=c),
|
||||
+ "zerodistance": meta("1.1", distance=0, dirty=False, config=c),
|
||||
+ "dirty": meta("1.1", distance=None, dirty=True, config=c),
|
||||
+ "distance": meta("1.1", distance=3, dirty=False, config=c),
|
||||
+ "distancedirty": meta("1.1", distance=3, dirty=True, config=c),
|
||||
}
|
||||
|
||||
|
||||
diff --git a/testing/test_version.py b/testing/test_version.py
|
||||
index be940ef..a287a0d 100644
|
||||
--- a/testing/test_version.py
|
||||
+++ b/testing/test_version.py
|
||||
@@ -3,33 +3,36 @@ from setuptools_scm.config import Configuration
|
||||
from setuptools_scm.version import meta, simplified_semver_version, tags_to_versions
|
||||
|
||||
|
||||
+c = Configuration()
|
||||
+
|
||||
+
|
||||
@pytest.mark.parametrize(
|
||||
"version, expected_next",
|
||||
[
|
||||
- pytest.param(meta("1.0.0"), "1.0.0", id="exact"),
|
||||
- pytest.param(meta("1.0"), "1.0.0", id="short_tag"),
|
||||
+ pytest.param(meta("1.0.0", config=c), "1.0.0", id="exact"),
|
||||
+ pytest.param(meta("1.0", config=c), "1.0.0", id="short_tag"),
|
||||
pytest.param(
|
||||
- meta("1.0.0", distance=2, branch="default"),
|
||||
+ meta("1.0.0", distance=2, branch="default", config=c),
|
||||
"1.0.1.dev2",
|
||||
id="normal_branch",
|
||||
),
|
||||
pytest.param(
|
||||
- meta("1.0", distance=2, branch="default"),
|
||||
+ meta("1.0", distance=2, branch="default", config=c),
|
||||
"1.0.1.dev2",
|
||||
id="normal_branch_short_tag",
|
||||
),
|
||||
pytest.param(
|
||||
- meta("1.0.0", distance=2, branch="feature"),
|
||||
+ meta("1.0.0", distance=2, branch="feature", config=c),
|
||||
"1.1.0.dev2",
|
||||
id="feature_branch",
|
||||
),
|
||||
pytest.param(
|
||||
- meta("1.0", distance=2, branch="feature"),
|
||||
+ meta("1.0", distance=2, branch="feature", config=c),
|
||||
"1.1.0.dev2",
|
||||
id="feature_branch_short_tag",
|
||||
),
|
||||
pytest.param(
|
||||
- meta("1.0.0", distance=2, branch="features/test"),
|
||||
+ meta("1.0.0", distance=2, branch="features/test", config=c),
|
||||
"1.1.0.dev2",
|
||||
id="feature_in_branch",
|
||||
),
|
||||
43
dev-python/setuptools_scm/setuptools_scm-3.1.0.ebuild
Normal file
43
dev-python/setuptools_scm/setuptools_scm-3.1.0.ebuild
Normal file
@@ -0,0 +1,43 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy pypy3 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="package to manage versions by scm tags via setuptools"
|
||||
HOMEPAGE="https://github.com/pypa/setuptools_scm https://pypi.org/project/setuptools_scm/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
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"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-vcs/git
|
||||
dev-vcs/mercurial )"
|
||||
|
||||
python_prepare_all() {
|
||||
local PATCHES=(
|
||||
"${FILESDIR}"/setuptools_scm-3.1.0-test-failures.patch
|
||||
)
|
||||
|
||||
# network access
|
||||
sed -i -e 's:test_pip_download:_&:' testing/test_regressions.py || die
|
||||
# all fetch specific setuptools versions
|
||||
rm testing/test_setuptools_support.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
py.test -v -v -x || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
Reference in New Issue
Block a user