2017-02-02 22:52:43 +03:00
|
|
|
# Copyright 1999-2017 Gentoo Foundation
|
2014-11-19 10:11:52 +03:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-11 00:17:55 +03:00
|
|
|
# $Id$
|
2014-11-19 10:11:52 +03:00
|
|
|
|
|
|
|
EAPI=5
|
2015-06-20 01:52:41 +03:00
|
|
|
|
2016-11-02 01:53:05 +03:00
|
|
|
PYTHON_COMPAT=( python2_7 python3_4 )
|
2015-11-12 10:40:02 +03:00
|
|
|
PYTHON_REQ_USE="threads(+)"
|
2014-11-19 10:11:52 +03:00
|
|
|
|
|
|
|
inherit distutils-r1 toolchain-funcs
|
|
|
|
|
2015-06-20 01:52:41 +03:00
|
|
|
DESCRIPTION="Lightweight and super-fast messaging library built on top of the ZeroMQ library"
|
2015-08-24 15:08:46 +03:00
|
|
|
HOMEPAGE="http://www.zeromq.org/bindings:python https://pypi.python.org/pypi/pyzmq"
|
2014-11-19 10:11:52 +03:00
|
|
|
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="LGPL-3"
|
|
|
|
SLOT="0"
|
2017-02-02 22:52:43 +03:00
|
|
|
KEYWORDS="amd64 arm ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
2014-11-19 10:11:52 +03:00
|
|
|
IUSE="doc examples green test"
|
|
|
|
|
2015-06-20 01:52:41 +03:00
|
|
|
# Ensures installation of gevent for test phase
|
|
|
|
REQUIRED_USE="test? ( green )"
|
|
|
|
|
2014-11-27 18:04:38 +03:00
|
|
|
PY2_USEDEP=$(python_gen_usedep python2_7)
|
2015-06-21 11:27:57 +03:00
|
|
|
RDEPEND=">=net-libs/zeromq-2.1.9:=
|
2014-11-19 10:11:52 +03:00
|
|
|
dev-python/py[${PYTHON_USEDEP}]
|
2015-06-20 01:52:41 +03:00
|
|
|
dev-python/cffi:=[${PYTHON_USEDEP}]
|
2014-11-19 10:11:52 +03:00
|
|
|
green? ( dev-python/gevent[${PY2_USEDEP}] )"
|
2014-12-21 02:42:11 +03:00
|
|
|
DEPEND="${RDEPEND}
|
2015-06-20 01:52:41 +03:00
|
|
|
test? ( dev-python/nose[${PYTHON_USEDEP}] )
|
2014-11-19 10:11:52 +03:00
|
|
|
doc? (
|
|
|
|
dev-python/sphinx[${PYTHON_USEDEP}]
|
|
|
|
dev-python/numpydoc[${PYTHON_USEDEP}]
|
|
|
|
)"
|
|
|
|
|
|
|
|
python_configure_all() {
|
|
|
|
tc-export CC
|
|
|
|
}
|
|
|
|
|
|
|
|
python_compile_all() {
|
|
|
|
use doc && emake -C docs html
|
|
|
|
}
|
|
|
|
|
|
|
|
python_compile() {
|
|
|
|
python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
|
|
|
|
distutils-r1_python_compile
|
|
|
|
}
|
|
|
|
|
|
|
|
python_test() {
|
|
|
|
if python_is_python3; then
|
|
|
|
einfo "Skipping python3 due to lack of support by gevent"
|
|
|
|
else
|
|
|
|
nosetests -svw "${BUILD_DIR}/lib/"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
python_install_all() {
|
|
|
|
use examples && local EXAMPLES=( examples/. )
|
|
|
|
use doc && local HTML_DOCS=( docs/build/html/. )
|
|
|
|
distutils-r1_python_install_all
|
|
|
|
}
|