commit:     a8b5173a082c63e1f9f54861b055fda71804f02a
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  2 13:10:52 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov  2 13:15:37 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8b5173a

dev-python/distlib: Import unbundle patch from fedora, fix broken tests

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/distlib/distlib-0.2.1-r1.ebuild         | 47 ++++++++++++++++++++++
 .../distlib/files/distlib-0.2.1-unbundle.patch     | 35 ++++++++++++++++
 2 files changed, 82 insertions(+)

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 0000000..5f84329
--- /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 0000000..5ee9129
--- /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,
+     },

Reply via email to