summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-11-02 14:10:52 +0100
committerJustin Lecher <jlec@gentoo.org>2015-11-02 14:15:37 +0100
commita8b5173a082c63e1f9f54861b055fda71804f02a (patch)
tree39135072455026c875e91404b268e321089a8300 /dev-python/distlib
parentdev-python/lockfile: x86 stable wrt bug #564588 (diff)
downloadgentoo-a8b5173a082c63e1f9f54861b055fda71804f02a.tar.gz
gentoo-a8b5173a082c63e1f9f54861b055fda71804f02a.tar.bz2
gentoo-a8b5173a082c63e1f9f54861b055fda71804f02a.zip
dev-python/distlib: Import unbundle patch from fedora, fix broken tests
Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'dev-python/distlib')
-rw-r--r--dev-python/distlib/distlib-0.2.1-r1.ebuild47
-rw-r--r--dev-python/distlib/files/distlib-0.2.1-unbundle.patch35
2 files changed, 82 insertions, 0 deletions
diff --git a/dev-python/distlib/distlib-0.2.1-r1.ebuild b/dev-python/distlib/distlib-0.2.1-r1.ebuild
new file mode 100644
index 000000000000..5f843295eb78
--- /dev/null
+++ b/dev-python/distlib/distlib-0.2.1-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Distribution utilities"
+HOMEPAGE="https://pypi.python.org/pypi/distlib https://bitbucket.org/vinay.sajip/distlib https://github.com/vsajip/distlib"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${P}-unbundle.patch
+)
+
+python_prepare_all() {
+ rm -r \
+ distlib/*.exe \
+ distlib/_backport \
+ tests/test_shutil.py* \
+ tests/test_sysconfig.py* || die
+
+ # Broken tests
+ # 1 fails due to it being sensitive to dictionary ordering
+ # inconsistency between code and test
+ sed \
+ -e 's:test_dependency_finder:_&:g' \
+ -e 's:test_abi:_&:g' \
+ -i tests/*py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ sed \
+ -e '/PIP_AVAILABLE/s:True:False:g' \
+ -i tests/*py || die
+ PYTHONHASHSEED=0 esetup.py test
+}
diff --git a/dev-python/distlib/files/distlib-0.2.1-unbundle.patch b/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
new file mode 100644
index 000000000000..5ee912905602
--- /dev/null
+++ b/dev-python/distlib/files/distlib-0.2.1-unbundle.patch
@@ -0,0 +1,35 @@
+--- distlib-0.1.9/distlib/compat.py.orig 2014-06-06 09:58:21.317560756 +0200
++++ distlib-0.1.9/distlib/compat.py 2014-06-06 09:58:29.955611427 +0200
+@@ -17,7 +17,7 @@ if sys.version_info[0] < 3:
+ from types import FileType as file_type
+ import __builtin__ as builtins
+ import ConfigParser as configparser
+- from ._backport import shutil
++ import shutil
+ from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
+ from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
+ pathname2url, ContentTooShortError, splittype)
+@@ -267,7 +267,7 @@ except ImportError: # pragma: no cover
+ try:
+ import sysconfig
+ except ImportError: # pragma: no cover
+- from ._backport import sysconfig
++ import sysconfig
+
+ try:
+ callable = callable
+--- distlib-0.1.9/setup.py.orig 2014-06-06 10:19:13.971997156 +0200
++++ distlib-0.1.9/setup.py 2014-06-06 10:19:20.012034150 +0200
+@@ -62,12 +62,7 @@ distutils.core.setup(
+ platforms='any',
+ packages=[
+ 'distlib',
+- 'distlib._backport',
+ ],
+- package_data={
+- 'distlib._backport': ['sysconfig.cfg'],
+- 'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe'],
+- },
+ cmdclass={
+ 'test': TestCommand,
+ },