dev-python/requests: Unbundle system libs
authorJustin Lecher <jlec@gentoo.org>
Thu, 21 Jan 2016 10:33:25 +0000 (11:33 +0100)
committerJustin Lecher <jlec@gentoo.org>
Thu, 21 Jan 2016 11:43:47 +0000 (12:43 +0100)
Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-python/requests/files/requests-2.9.1-system-packages.patch [new file with mode: 0644]
dev-python/requests/requests-2.9.1-r1.ebuild [moved from dev-python/requests/requests-2.9.1.ebuild with 82% similarity]

diff --git a/dev-python/requests/files/requests-2.9.1-system-packages.patch b/dev-python/requests/files/requests-2.9.1-system-packages.patch
new file mode 100644 (file)
index 0000000..f511d0d
--- /dev/null
@@ -0,0 +1,20 @@
+ setup.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index b7ed12b..1d5abe4 100755
+--- a/setup.py
++++ b/setup.py
+@@ -18,12 +18,6 @@ if sys.argv[-1] == 'publish':
+ packages = [
+     'requests',
+     'requests.packages',
+-    'requests.packages.chardet',
+-    'requests.packages.urllib3',
+-    'requests.packages.urllib3.packages',
+-    'requests.packages.urllib3.contrib',
+-    'requests.packages.urllib3.util',
+-    'requests.packages.urllib3.packages.ssl_match_hostname',
+ ]
+ 
+ requires = []
similarity index 82%
rename from dev-python/requests/requests-2.9.1.ebuild
rename to dev-python/requests/requests-2.9.1-r1.ebuild
index 4d4a6086e01f6af7141cd7278e5c2427c328d855..3228f55e57b0cbd492bd21f50da1072d5d6b9305 100644 (file)
@@ -1,10 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 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 )
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1
@@ -18,7 +18,6 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
 IUSE="test"
 
-# bundles dev-python/urllib3 snapshot
 RDEPEND="
        app-misc/ca-certificates
        >=dev-python/chardet-2.2.1[${PYTHON_USEDEP}]
@@ -26,6 +25,7 @@ RDEPEND="
        >=dev-python/py-1.4.30[${PYTHON_USEDEP}]
        dev-python/pyasn1[${PYTHON_USEDEP}]
        >=dev-python/pyopenssl-0.13[$(python_gen_usedep 'python*' pypy)]
+       dev-python/urllib3[${PYTHON_USEDEP}]
        "
 DEPEND="${RDEPEND}
        dev-python/setuptools[${PYTHON_USEDEP}]
@@ -39,13 +39,13 @@ DEPEND="${RDEPEND}
 RESTRICT="test"
 
 PATCHES=(
-       "${FILESDIR}"/${PN}-2.2.0-system-chardet.patch
+       "${FILESDIR}"/${P}-system-packages.patch
        "${FILESDIR}"/${PN}-2.5.0-system-cacerts.patch
 )
 
 python_prepare_all() {
-       # use system chardet
-       rm -r requests/packages/chardet || die
+       # use system chardet & urllib3
+       rm -r requests/packages/{chardet,urllib3} || die
 
        distutils-r1_python_prepare_all
 }