1 |
commit: 466d1ab1a0f249640f16151c535fc307eb6019c1 |
2 |
Author: Tim Harder <radhermit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 24 08:43:56 2018 +0000 |
4 |
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 24 08:46:12 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=466d1ab1 |
7 |
|
8 |
dev-python/twine: initial import |
9 |
|
10 |
Closes: https://bugs.gentoo.org/567064 |
11 |
|
12 |
dev-python/twine/Manifest | 1 + |
13 |
dev-python/twine/files/twine-1.11.0-tests.patch | 18 +++++++++++ |
14 |
dev-python/twine/metadata.xml | 12 ++++++++ |
15 |
dev-python/twine/twine-1.11.0.ebuild | 40 +++++++++++++++++++++++++ |
16 |
4 files changed, 71 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/twine/Manifest b/dev-python/twine/Manifest |
19 |
new file mode 100644 |
20 |
index 00000000000..d86f366ef82 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/twine/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST twine-1.11.0.tar.gz 55301 BLAKE2B 88e88bc88a6dc8320064b3e296d85f1614d1ecf1628c8442737566ac58c3296b2292f147c0b39047a1d13a3ac98297fd7a77a0ba6fdb6ff04e59d16bc8ed463a SHA512 28e588f26b59bc9f4a8481caf2353934ad6927734762ffebb4416c147ec9e6dffb37092def20a76eb888c94b27f97e013dacc42c63e5dcda30f4290bb6c90a22 |
25 |
|
26 |
diff --git a/dev-python/twine/files/twine-1.11.0-tests.patch b/dev-python/twine/files/twine-1.11.0-tests.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..386a4ebcf3a |
29 |
--- /dev/null |
30 |
+++ b/dev-python/twine/files/twine-1.11.0-tests.patch |
31 |
@@ -0,0 +1,18 @@ |
32 |
+Check for python2 support first, then python3. This should help avoid importing |
33 |
+the wrong module for python2 where the builtins module can be provided by the |
34 |
+futures package. |
35 |
+ |
36 |
+--- twine-1.11.0/tests/test_utils.py |
37 |
++++ twine-1.11.0/tests/test_utils.py |
38 |
+@@ -19,9 +19,9 @@ |
39 |
+ import textwrap |
40 |
+ |
41 |
+ try: |
42 |
+- import builtins |
43 |
+-except ImportError: |
44 |
+ import __builtin__ as builtins |
45 |
++except ImportError: |
46 |
++ import builtins |
47 |
+ |
48 |
+ import pytest |
49 |
+ |
50 |
|
51 |
diff --git a/dev-python/twine/metadata.xml b/dev-python/twine/metadata.xml |
52 |
new file mode 100644 |
53 |
index 00000000000..3b7872fa6a9 |
54 |
--- /dev/null |
55 |
+++ b/dev-python/twine/metadata.xml |
56 |
@@ -0,0 +1,12 @@ |
57 |
+<?xml version="1.0" encoding="UTF-8"?> |
58 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
59 |
+<pkgmetadata> |
60 |
+ <maintainer type="project"> |
61 |
+ <email>python@g.o</email> |
62 |
+ <name>Python</name> |
63 |
+ </maintainer> |
64 |
+ <upstream> |
65 |
+ <remote-id type="pypi">twine</remote-id> |
66 |
+ <remote-id type="github">pypa/twine</remote-id> |
67 |
+ </upstream> |
68 |
+</pkgmetadata> |
69 |
|
70 |
diff --git a/dev-python/twine/twine-1.11.0.ebuild b/dev-python/twine/twine-1.11.0.ebuild |
71 |
new file mode 100644 |
72 |
index 00000000000..053b8a76763 |
73 |
--- /dev/null |
74 |
+++ b/dev-python/twine/twine-1.11.0.ebuild |
75 |
@@ -0,0 +1,40 @@ |
76 |
+# Copyright 1999-2018 Gentoo Foundation |
77 |
+# Distributed under the terms of the GNU General Public License v2 |
78 |
+ |
79 |
+EAPI=6 |
80 |
+ |
81 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
82 |
+ |
83 |
+inherit distutils-r1 |
84 |
+ |
85 |
+DESCRIPTION="Collection of utilities for publishing packages on PyPI" |
86 |
+HOMEPAGE="https://twine.readthedocs.io/ https://github.com/pypa/twine https://pypi.python.org/pypi/twine" |
87 |
+SRC_URI="https://github.com/pypa/twine/archive/${PV}.tar.gz -> ${P}.tar.gz" |
88 |
+# pypi tarballs don't contain test data |
89 |
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
90 |
+ |
91 |
+LICENSE="Apache-2.0" |
92 |
+SLOT="0" |
93 |
+KEYWORDS="~amd64 ~x86" |
94 |
+IUSE="test" |
95 |
+ |
96 |
+CDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" |
97 |
+DEPEND="${CDEPEND} |
98 |
+ test? ( |
99 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
100 |
+ dev-python/pretend[${PYTHON_USEDEP}] |
101 |
+ ) |
102 |
+" |
103 |
+RDEPEND="${CDEPEND} |
104 |
+ >=dev-python/tqdm-4.14[${PYTHON_USEDEP}] |
105 |
+ >=dev-python/pkginfo-1.4.2[${PYTHON_USEDEP}] |
106 |
+ >=dev-python/requests-2.5.0[${PYTHON_USEDEP}] |
107 |
+ >=dev-python/requests-toolbelt-0.8.0[${PYTHON_USEDEP}] |
108 |
+ $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' python{2_7,3_4,3_5}) |
109 |
+" |
110 |
+ |
111 |
+PATCHES=( "${FILESDIR}"/${P}-tests.patch ) |
112 |
+ |
113 |
+python_test() { |
114 |
+ py.test -v tests || die "tests fail with ${EPYTHON}" |
115 |
+} |