1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{5,6,7,8} )
9 DESCRIPTION="Python bindings for libgit2"
10 HOMEPAGE="https://github.com/libgit2/pygit2 https://pypi.org/project/pygit2/"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13 LICENSE="GPL-2-with-linking-exception"
15 KEYWORDS="~amd64 ~x86"
17 RESTRICT="!test? ( test )"
20 =dev-libs/libgit2-0.28*
21 >=dev-python/cffi-1.0:=[${PYTHON_USEDEP}]
24 test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
27 distutils-r1_src_prepare
29 # unconditionally prevent it from using network
30 sed -i -e '/def no_network/a \
31 return True' test/utils.py || die
33 # we need to move them away to prevent pytest from forcing '..'
37 ln -s hack/test test || die
41 pytest -vv hack/test || die