aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Zuber <a.zuber@gmx.ch>2020-08-24 15:17:02 +0200
committerAndreas Zuber <a.zuber@gmx.ch>2020-08-24 15:17:26 +0200
commitb2fabdcc1942bf8499ffa5ebcb16189aabe2d299 (patch)
treefe9f1449b384d4109099122fae7e8318a5960aa8
parentdev-python/mnemonic: new package (diff)
downloadguru-b2fabdcc.tar.gz
guru-b2fabdcc.tar.bz2
guru-b2fabdcc.zip
dev-python/hwi: new package
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Andreas Zuber <a.zuber@gmx.ch>
-rw-r--r--dev-python/hwi/Manifest1
-rw-r--r--dev-python/hwi/hwi-1.1.2.ebuild55
-rw-r--r--dev-python/hwi/metadata.xml11
3 files changed, 67 insertions, 0 deletions
diff --git a/dev-python/hwi/Manifest b/dev-python/hwi/Manifest
new file mode 100644
index 000000000..a83784924
--- /dev/null
+++ b/dev-python/hwi/Manifest
@@ -0,0 +1 @@
+DIST hwi-1.1.2.tar.gz 191620 BLAKE2B f5c7001efa4dfe73b3641ff17dcc8e004b16102eabbee8f2b777279d193d53d19aad11ece0aaa3b885a6f72009de2b7a407e625011e6c4e59cca8c227635772f SHA512 bde36a4fca4f36abef57f5557f38bd1957fd13362f14f9e2e1f0b86c20f6669d0fe0f2763799922250eaf3c936cd87bcdae833b90424f136be66ddcb098b55d1
diff --git a/dev-python/hwi/hwi-1.1.2.ebuild b/dev-python/hwi/hwi-1.1.2.ebuild
new file mode 100644
index 000000000..afe011ee5
--- /dev/null
+++ b/dev-python/hwi/hwi-1.1.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1 udev
+
+DESCRIPTION="Library and command line tool for interacting with hardware wallets"
+HOMEPAGE="https://github.com/bitcoin-core/HWI"
+
+MY_PN="HWI"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="https://github.com/bitcoin-core/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="udev doc"
+
+BDEPEND=""
+RDEPEND="
+ >=dev-python/ecdsa-0.13.0[${PYTHON_USEDEP}]
+ >=dev-python/hidapi-0.7.99[${PYTHON_USEDEP}]
+ >=dev-python/libusb1-1.7.0[${PYTHON_USEDEP}]
+ >=dev-python/mnemonic-0.18.0[${PYTHON_USEDEP}]
+ >=dev-python/pyaes-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-3.7.4.1[${PYTHON_USEDEP}]"
+
+distutils_enable_tests unittest
+
+S="${WORKDIR}/${MY_P}"
+
+python_prepare_all() {
+ # remove upper bounds on dependencies from setup.py file
+ sed 's/,<[0-9.]\+//' -i setup.py || die "sed failed"
+
+ pushd test
+ # remove tests that require hardware emulation
+ rm test_coldcard.py test_device.py test_digitalbitbox.py test_keepkey.py test_ledger.py test_trezor.py
+ # remove udev tests because it expects the rules are installed in the libs folder
+ rm test_udevrules.py
+ popd
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ use udev && udev_dorules hwilib/udev/*.rules
+ use doc && dodoc -r docs
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/hwi/metadata.xml b/dev-python/hwi/metadata.xml
new file mode 100644
index 000000000..b63e8de30
--- /dev/null
+++ b/dev-python/hwi/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>a.zuber@gmx.ch</email>
+ <name>Andreas Zuber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">bitcoin-core/HWI</remote-id>
+ </upstream>
+</pkgmetadata>