Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/twine/
Date: Fri, 25 Dec 2020 09:17:20
Message-Id: 1608887626.dcdd744209d2588b71d022741fe96b27f9be2e4a.mgorny@gentoo
1 commit: dcdd744209d2588b71d022741fe96b27f9be2e4a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 25 08:36:08 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 25 09:13:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcdd7442
7
8 dev-python/twine: Bump to 3.3.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/twine/Manifest | 1 +
13 dev-python/twine/twine-3.3.0.ebuild | 66 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 67 insertions(+)
15
16 diff --git a/dev-python/twine/Manifest b/dev-python/twine/Manifest
17 index 5879478ddd5..03a73d81249 100644
18 --- a/dev-python/twine/Manifest
19 +++ b/dev-python/twine/Manifest
20 @@ -1 +1,2 @@
21 DIST twine-3.2.0.tar.gz 145280 BLAKE2B b25fa984486a375e09705703a47994b529f6e5b48c6733c0a07b57bec6c0dfcdf4096d6ac6b0f9b7a7bfebfb32ea1cfb49c5de79f29495eb2a8fc59a5f8de4e5 SHA512 9959430913ea570d22f2d8b94e929af36b409b71691b3f66de8ddb77cfbfbe36590e21a6062db2a4a4f56ce2eb96984b0a474a93ea96b7734f53ada7a6411c28
22 +DIST twine-3.3.0.tar.gz 148996 BLAKE2B 60668acd0481534631ca0ecf3c755df7e9e46c6d183d0f1c73ed7467cfecc144878d6ccf7ef2ee62efa17eb5629f5ed74c77c8ae4d57ef16530fad31afe40d97 SHA512 94fc7a9b3f2b5fc7c06baf55debf4fd55f6a2b4c4321c9bff46b844166769ce8bdcab10355c4967998149b62e13b26e11a30ff66042bfdd5af24d448321fd291
23
24 diff --git a/dev-python/twine/twine-3.3.0.ebuild b/dev-python/twine/twine-3.3.0.ebuild
25 new file mode 100644
26 index 00000000000..6dc766493a0
27 --- /dev/null
28 +++ b/dev-python/twine/twine-3.3.0.ebuild
29 @@ -0,0 +1,66 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +DISTUTILS_USE_SETUPTOOLS=rdepend
36 +PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
37 +
38 +inherit distutils-r1
39 +
40 +DESCRIPTION="Collection of utilities for publishing packages on PyPI"
41 +HOMEPAGE="https://twine.readthedocs.io/ https://github.com/pypa/twine https://pypi.org/project/twine/"
42 +SRC_URI="https://github.com/pypa/twine/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +
44 +LICENSE="Apache-2.0"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos"
47 +IUSE="test"
48 +RESTRICT="!test? ( test )"
49 +
50 +BDEPEND="
51 + test? (
52 + dev-python/jaraco-envs[${PYTHON_USEDEP}]
53 + dev-python/jaraco-functools[${PYTHON_USEDEP}]
54 + dev-python/munch[${PYTHON_USEDEP}]
55 + dev-python/portend[${PYTHON_USEDEP}]
56 + dev-python/pretend[${PYTHON_USEDEP}]
57 + dev-python/pypiserver[${PYTHON_USEDEP}]
58 + dev-python/pytest[${PYTHON_USEDEP}]
59 + )
60 +"
61 +RDEPEND="
62 + >=dev-python/tqdm-4.14[${PYTHON_USEDEP}]
63 + >=dev-python/pkginfo-1.4.2[${PYTHON_USEDEP}]
64 + >=dev-python/readme_renderer-21.0[${PYTHON_USEDEP}]
65 + >=dev-python/requests-2.20.0[${PYTHON_USEDEP}]
66 + >=dev-python/requests-toolbelt-0.8.0[${PYTHON_USEDEP}]
67 + $(python_gen_cond_dep 'dev-python/importlib_metadata[${PYTHON_USEDEP}]' python3_{6,7} pypy{,3})
68 + >=dev-python/keyring-15.1[${PYTHON_USEDEP}]
69 + >=dev-python/rfc3986-1.4.0[${PYTHON_USEDEP}]
70 + >=dev-python/colorama-0.4.3[${PYTHON_USEDEP}]
71 +"
72 +
73 +python_prepare_all() {
74 + # avoid a setuptools_scm dependency
75 + sed -i "s:use_scm_version=True:version='${PV}',name='${PN//-/.}':" setup.py || die
76 + sed -r -i "s:setuptools(_|-)scm[[:space:]]*([><=]{1,2}[[:space:]]*[0-9.a-zA-Z]+|)[[:space:]]*::" \
77 + setup.cfg || die
78 +
79 + # requires internet
80 + sed -e 's:test_check_status_code_for_wrong_repo_url:_&:' \
81 + -i tests/test_upload.py || die
82 + rm -f tests/test_integration.py || die
83 + # pytest-socket dep relevant only to test_integration, and upstream
84 + # disables it anyway
85 + sed -i -e '/--disable-socket/d' pytest.ini || die
86 +
87 + sed -i -e '/--cov/d' pytest.ini || die
88 +
89 + distutils-r1_python_prepare_all
90 +}
91 +
92 +python_test() {
93 + distutils_install_for_testing
94 + pytest -vv || die "Tests fail with ${EPYTHON}"
95 +}