summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-06-14 20:49:14 -0700
committerZac Medico <zmedico@gentoo.org>2018-06-14 23:03:21 -0700
commit4b6fe56b20bef9571e9b3c3ff76f46ca9615dd5a (patch)
treeb233e51bed5ee374369306895af9a8ce0a5545cf /dev-python/pyu2f
parentdev-python/pyfakefs: keyword ~arm (diff)
downloadgentoo-4b6fe56b20bef9571e9b3c3ff76f46ca9615dd5a.tar.gz
gentoo-4b6fe56b20bef9571e9b3c3ff76f46ca9615dd5a.tar.bz2
gentoo-4b6fe56b20bef9571e9b3c3ff76f46ca9615dd5a.zip
dev-python/pyu2f: new package
Package-Manager: Portage-2.3.40, Repoman-2.3.9 RepoMan-Options: --force
Diffstat (limited to 'dev-python/pyu2f')
-rw-r--r--dev-python/pyu2f/Manifest1
-rw-r--r--dev-python/pyu2f/metadata.xml12
-rw-r--r--dev-python/pyu2f/pyu2f-0.1.4.ebuild46
3 files changed, 59 insertions, 0 deletions
diff --git a/dev-python/pyu2f/Manifest b/dev-python/pyu2f/Manifest
new file mode 100644
index 000000000000..aa7cbd9f2316
--- /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 000000000000..703402ed3f93
--- /dev/null
+++ b/dev-python/pyu2f/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ <name>Zac Medico</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">pyu2f</remote-id>
+ <remote-id type="github">google/pyu2f</remote-id>
+ </upstream>
+</pkgmetadata>
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 000000000000..ec3ffe52ec8c
--- /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}"
+}