diff --git a/dev-python/pyu2f/Manifest b/dev-python/pyu2f/Manifest new file mode 100644 index 0000000000000..aa7cbd9f23162 --- /dev/null +++ b/dev-python/pyu2f/Manifest @@ -0,0 +1 @@ +DIST pyu2f-0.1.4.tar.gz 38797 BLAKE2B 4240083b03bd596d1f87e42047980ab7c75d0064eec0ed2050d77bb92d26fac651af515c2c9b10d338e27ecd778e80ff47b5c33a68cd86328dc913c0e70cb1da SHA512 16f948b812edd5f0e4d97350872809b7c1b52f38eea49170e4aa21e0f695935dc0d71d4fa077ee1c1a3ef2f0711d62f0cc49983a89c841aa31aadf7b76340035 diff --git a/dev-python/pyu2f/metadata.xml b/dev-python/pyu2f/metadata.xml new file mode 100644 index 0000000000000..703402ed3f930 --- /dev/null +++ b/dev-python/pyu2f/metadata.xml @@ -0,0 +1,12 @@ + + + + + zmedico@gentoo.org + Zac Medico + + + pyu2f + google/pyu2f + + diff --git a/dev-python/pyu2f/pyu2f-0.1.4.ebuild b/dev-python/pyu2f/pyu2f-0.1.4.ebuild new file mode 100644 index 0000000000000..ec3ffe52ec8cb --- /dev/null +++ b/dev-python/pyu2f/pyu2f-0.1.4.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +inherit distutils-r1 + +DESCRIPTION="Python based U2F host library" +HOMEPAGE="https://github.com/google/pyu2f" +# pypi tarball lacks unit tests +#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/google/pyu2f/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="test" + +RDEPEND=" + dev-python/six[${PYTHON_USEDEP}] +" +DEPEND=" + ${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/pyfakefs[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/unittest2[${PYTHON_USEDEP}] + ) +" + +DOCS=( CONTRIBUTING.md README.md ) + +python_prepare_all() { + sed -e 's:json.loads(communicate_json):json.loads(communicate_json.decode()):' \ + -i pyu2f/tests/customauthenticator_test.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + py.test -v pyu2f/tests || die "Tests failed under ${EPYTHON}" +}