Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/distlib/, dev-python/distlib/files/
Date: Mon, 02 Nov 2015 13:15:44
Message-Id: 1446470137.a8b5173a082c63e1f9f54861b055fda71804f02a.jlec@gentoo
1 commit: a8b5173a082c63e1f9f54861b055fda71804f02a
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 2 13:10:52 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 2 13:15:37 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8b5173a
7
8 dev-python/distlib: Import unbundle patch from fedora, fix broken tests
9
10 Package-Manager: portage-2.2.23
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 dev-python/distlib/distlib-0.2.1-r1.ebuild | 47 ++++++++++++++++++++++
14 .../distlib/files/distlib-0.2.1-unbundle.patch | 35 ++++++++++++++++
15 2 files changed, 82 insertions(+)
16
17 diff --git a/dev-python/distlib/distlib-0.2.1-r1.ebuild b/dev-python/distlib/distlib-0.2.1-r1.ebuild
18 new file mode 100644
19 index 0000000..5f84329
20 --- /dev/null
21 +++ b/dev-python/distlib/distlib-0.2.1-r1.ebuild
22 @@ -0,0 +1,47 @@
23 +# Copyright 1999-2015 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +EAPI=5
28 +
29 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
30 +
31 +inherit distutils-r1
32 +
33 +DESCRIPTION="Distribution utilities"
34 +HOMEPAGE="https://pypi.python.org/pypi/distlib https://bitbucket.org/vinay.sajip/distlib https://github.com/vsajip/distlib"
35 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
36 +
37 +SLOT="0"
38 +LICENSE="BSD"
39 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
40 +IUSE=""
41 +
42 +PATCHES=(
43 + "${FILESDIR}"/${P}-unbundle.patch
44 +)
45 +
46 +python_prepare_all() {
47 + rm -r \
48 + distlib/*.exe \
49 + distlib/_backport \
50 + tests/test_shutil.py* \
51 + tests/test_sysconfig.py* || die
52 +
53 + # Broken tests
54 + # 1 fails due to it being sensitive to dictionary ordering
55 + # inconsistency between code and test
56 + sed \
57 + -e 's:test_dependency_finder:_&:g' \
58 + -e 's:test_abi:_&:g' \
59 + -i tests/*py || die
60 +
61 + distutils-r1_python_prepare_all
62 +}
63 +
64 +python_test() {
65 + sed \
66 + -e '/PIP_AVAILABLE/s:True:False:g' \
67 + -i tests/*py || die
68 + PYTHONHASHSEED=0 esetup.py test
69 +}
70
71 diff --git a/dev-python/distlib/files/distlib-0.2.1-unbundle.patch b/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
72 new file mode 100644
73 index 0000000..5ee9129
74 --- /dev/null
75 +++ b/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
76 @@ -0,0 +1,35 @@
77 +--- distlib-0.1.9/distlib/compat.py.orig 2014-06-06 09:58:21.317560756 +0200
78 ++++ distlib-0.1.9/distlib/compat.py 2014-06-06 09:58:29.955611427 +0200
79 +@@ -17,7 +17,7 @@ if sys.version_info[0] < 3:
80 + from types import FileType as file_type
81 + import __builtin__ as builtins
82 + import ConfigParser as configparser
83 +- from ._backport import shutil
84 ++ import shutil
85 + from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
86 + from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
87 + pathname2url, ContentTooShortError, splittype)
88 +@@ -267,7 +267,7 @@ except ImportError: # pragma: no cover
89 + try:
90 + import sysconfig
91 + except ImportError: # pragma: no cover
92 +- from ._backport import sysconfig
93 ++ import sysconfig
94 +
95 + try:
96 + callable = callable
97 +--- distlib-0.1.9/setup.py.orig 2014-06-06 10:19:13.971997156 +0200
98 ++++ distlib-0.1.9/setup.py 2014-06-06 10:19:20.012034150 +0200
99 +@@ -62,12 +62,7 @@ distutils.core.setup(
100 + platforms='any',
101 + packages=[
102 + 'distlib',
103 +- 'distlib._backport',
104 + ],
105 +- package_data={
106 +- 'distlib._backport': ['sysconfig.cfg'],
107 +- 'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe'],
108 +- },
109 + cmdclass={
110 + 'test': TestCommand,
111 + },