commit:     98186e1017b733843b6f5abf64291a96f254b6ab
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 13 06:59:29 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 07:07:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98186e10

dev-python/socketpool: Make gevent dep optional

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/socketpool/metadata.xml               |  6 ++++++
 dev-python/socketpool/socketpool-0.5.3-r2.ebuild | 21 +++++++++++++++++----
 profiles/arch/ia64/package.use.mask              |  4 ++++
 3 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/dev-python/socketpool/metadata.xml 
b/dev-python/socketpool/metadata.xml
index a948c85adc2..d9df93424f6 100644
--- a/dev-python/socketpool/metadata.xml
+++ b/dev-python/socketpool/metadata.xml
@@ -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>

diff --git a/dev-python/socketpool/socketpool-0.5.3-r2.ebuild 
b/dev-python/socketpool/socketpool-0.5.3-r2.ebuild
index 0972b88b467..c1a63b20d0a 100644
--- a/dev-python/socketpool/socketpool-0.5.3-r2.ebuild
+++ b/dev-python/socketpool/socketpool-0.5.3-r2.ebuild
@@ -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 )
 

diff --git a/profiles/arch/ia64/package.use.mask 
b/profiles/arch/ia64/package.use.mask
index f28848f2fc4..c1c4150d066 100644
--- a/profiles/arch/ia64/package.use.mask
+++ b/profiles/arch/ia64/package.use.mask
@@ -1,6 +1,10 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Michał Górny <[email protected]> (2020-04-13)
+# Requires unsupported dev-python/gevent.
+dev-python/socketpool gevent
+
 # # Sergei Trofimovich <[email protected]> (2020-04-12)
 # ruby-2.7 dropped ia64 support, mask dependencies requiring ruby.
 # These pull in:

Reply via email to