1 |
commit: a64b133d87d3ef9ac3952c2738c5e5a87d8cf676 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 28 06:33:22 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 28 06:40:02 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a64b133d |
7 |
|
8 |
dev-python/packaging: Allow installation without setuptools |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
.../files/packaging-15.3-setuptools.patch | 30 ++++++++++++++++++++ |
14 |
dev-python/packaging/packaging-15.3-r1.ebuild | 33 ++++++++++++++++++++++ |
15 |
2 files changed, 63 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/packaging/files/packaging-15.3-setuptools.patch b/dev-python/packaging/files/packaging-15.3-setuptools.patch |
18 |
new file mode 100644 |
19 |
index 0000000..abb0662 |
20 |
--- /dev/null |
21 |
+++ b/dev-python/packaging/files/packaging-15.3-setuptools.patch |
22 |
@@ -0,0 +1,30 @@ |
23 |
+ setup.py | 9 +++++++-- |
24 |
+ 1 file changed, 7 insertions(+), 2 deletions(-) |
25 |
+ |
26 |
+diff --git a/setup.py b/setup.py |
27 |
+index 13c9dad..9d68590 100644 |
28 |
+--- a/setup.py |
29 |
++++ b/setup.py |
30 |
+@@ -15,7 +15,12 @@ |
31 |
+ from __future__ import absolute_import, division, print_function |
32 |
+ |
33 |
+ import os |
34 |
+-import setuptools |
35 |
++ |
36 |
++try: |
37 |
++ from setuptools import setup |
38 |
++except ImportError: |
39 |
++ from distutils.core import setup |
40 |
++ |
41 |
+ |
42 |
+ |
43 |
+ base_dir = os.path.dirname(__file__) |
44 |
+@@ -31,7 +36,7 @@ with open(os.path.join(base_dir, "CHANGELOG.rst")) as f: |
45 |
+ long_description = "\n".join([long_description, f.read()]) |
46 |
+ |
47 |
+ |
48 |
+-setuptools.setup( |
49 |
++setup( |
50 |
+ name=about["__title__"], |
51 |
+ version=about["__version__"], |
52 |
+ |
53 |
|
54 |
diff --git a/dev-python/packaging/packaging-15.3-r1.ebuild b/dev-python/packaging/packaging-15.3-r1.ebuild |
55 |
new file mode 100644 |
56 |
index 0000000..f43c596 |
57 |
--- /dev/null |
58 |
+++ b/dev-python/packaging/packaging-15.3-r1.ebuild |
59 |
@@ -0,0 +1,33 @@ |
60 |
+# Copyright 1999-2015 Gentoo Foundation |
61 |
+# Distributed under the terms of the GNU General Public License v2 |
62 |
+# $Id$ |
63 |
+ |
64 |
+EAPI=5 |
65 |
+ |
66 |
+PYTHON_COMPAT=( python2_7 python3_{3,4} pypy pypy3 ) |
67 |
+ |
68 |
+inherit distutils-r1 |
69 |
+ |
70 |
+DESCRIPTION="Core utilities for Python packages" |
71 |
+HOMEPAGE="https://github.com/pypa/packaging https://pypi.python.org/pypi/packaging" |
72 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
73 |
+ |
74 |
+SLOT="0" |
75 |
+LICENSE="Apache-2.0" |
76 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
77 |
+IUSE="test" |
78 |
+ |
79 |
+RDEPEND="" |
80 |
+DEPEND="${RDEPEND} |
81 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
82 |
+ test? ( |
83 |
+ dev-python/pretend[${PYTHON_USEDEP}] |
84 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
85 |
+ ) |
86 |
+" |
87 |
+ |
88 |
+PATCHES=( "${FILESDIR}"/${P}-setuptools.patch ) |
89 |
+ |
90 |
+python_test() { |
91 |
+ py.test --capture=no --strict -v || die |
92 |
+} |