dev-python/socketpool: Make gevent dep optional
authorMichał Górny <mgorny@gentoo.org>
Mon, 13 Apr 2020 06:59:29 +0000 (08:59 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 13 Apr 2020 07:07:21 +0000 (09:07 +0200)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/socketpool/metadata.xml
dev-python/socketpool/socketpool-0.5.3-r2.ebuild
profiles/arch/ia64/package.use.mask

index a948c85adc2a4cdfb0208a1fc63ec7f8eecac8bc..d9df93424f62fa604fe34f72220a8eba8f9e5b6f 100644 (file)
@@ -9,4 +9,10 @@
     <remote-id type="pypi">socketpool</remote-id>
     <remote-id type="github">benoitc/socketpool</remote-id>
   </upstream>
+  <use>
+    <flag name="gevent">
+      Install <pkg>dev-python/gevent</pkg> as needed for the gevent
+      backend.
+    </flag>
+  </use>
 </pkgmetadata>
index 0972b88b46743080a54319e8f958179d011a77d6..c1a63b20d0a76ffffa48dcd07d1b504fd1dbdc39 100644 (file)
@@ -11,13 +11,26 @@ DESCRIPTION="A simple Python socket pool"
 HOMEPAGE="https://github.com/benoitc/socketpool/"
 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 
-KEYWORDS="~alpha amd64 arm arm64 ppc ppc64 s390 ~sparc x86"
-IUSE="examples test"
+KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 s390 ~sparc x86"
+IUSE="examples gevent"
 LICENSE="|| ( MIT public-domain )"
 SLOT="0"
 
-RDEPEND="$(python_gen_cond_dep 'dev-python/gevent[${PYTHON_USEDEP}]' 'python2*')"
-BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="
+       gevent? (
+               $(python_gen_cond_dep '
+                       dev-python/gevent[${PYTHON_USEDEP}]
+               ' 'python*')
+       )"
+
+BDEPEND="
+       test? (
+               !ia64? (
+                       $(python_gen_cond_dep '
+                               dev-python/gevent[${PYTHON_USEDEP}]
+                       ' 'python*')
+               )
+       )"
 
 PATCHES=( "${FILESDIR}"/${PN}-0.5.2-locale.patch )
 
index f28848f2fc4be2ecf945fbebb72f45439454c61e..c1c4150d0661cd78198eba6838fde0185bfa444c 100644 (file)
@@ -1,6 +1,10 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Michał Górny <mgorny@gentoo.org> (2020-04-13)
+# Requires unsupported dev-python/gevent.
+dev-python/socketpool gevent
+
 # # Sergei Trofimovich <slyfox@gentoo.org> (2020-04-12)
 # ruby-2.7 dropped ia64 support, mask dependencies requiring ruby.
 # These pull in: