dev-libs/olm: add python bindings
This commit is contained in:
parent
aee1ba827e
commit
6819304da4
2 changed files with 43 additions and 4 deletions
|
|
@ -1,9 +1,11 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-utils
|
||||
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
|
||||
|
||||
inherit cmake-utils python-r1
|
||||
|
||||
DESCRIPTION="Implementation of the olm and megolm cryptographic ratchets"
|
||||
HOMEPAGE="https://gitlab.matrix.org/matrix-org/olm"
|
||||
|
|
@ -12,4 +14,41 @@ SRC_URI="https://gitlab.matrix.org/matrix-org/${PN}/-/archive/${PV}/${P}.tar.bz2
|
|||
LICENSE="Apache2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
IUSE="+python"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
dev-python/cffi[${PYTHON_USEDEP}]
|
||||
dev-python/future[${PYTHON_USEDEP}]
|
||||
dev-python/typing[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
compile_pybinding() {
|
||||
cd python
|
||||
"${EPYTHON}" setup.py build || die
|
||||
python_optimize
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl compile_pybinding
|
||||
fi
|
||||
}
|
||||
|
||||
install_pybinding() {
|
||||
cd python
|
||||
"${EPYTHON}" setup.py install --root="${D}" --prefix="${EPREFIX}/usr/" || die
|
||||
python_optimize
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl install_pybinding
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue