f7eac6d
%global libname btchip
f7eac6d
%global srcname %{libname}-python
f7eac6d
f7eac6d
Name:     python-%{libname}
f7eac6d
Version:  0.1.32
f7eac6d
Release:  4%{?dist}
f7eac6d
Summary:  Python communication library for Ledger Hardware Wallet products
f7eac6d
f7eac6d
License:  ASL 2.0
f7eac6d
URL:      https://github.com/LedgerHQ/btchip-python
f7eac6d
Source0:  %{pypi_source}
f7eac6d
Source1:  https://raw.githubusercontent.com/LedgerHQ/udev-rules/765b7fdf57b20fd9326cedf48ee52e905024ab4f/20-hw1.rules
f7eac6d
Source2:  https://raw.githubusercontent.com/LedgerHQ/btchip-python/3a941ed1a257a8ad519a473e361cda16fb4f36fd/LICENSE
f7eac6d
f7eac6d
BuildArch:     noarch
f7eac6d
BuildRequires: systemd
f7eac6d
f7eac6d
%global _description %{expand:
f7eac6d
btchip-python is a python API for communicating primarily with the
f7eac6d
Ledger HW.1 hardware bitcoin wallet. This library also adds compatibility
f7eac6d
to Electrum in order to use the "Nano", "Nano S", and other Ledger-based
f7eac6d
hardware wallets.}
f7eac6d
f7eac6d
%description %_description
f7eac6d
f7eac6d
%package -n python3-%{libname}
f7eac6d
Summary: %{summary}
f7eac6d
BuildRequires: python3-devel
f7eac6d
BuildRequires: python3-setuptools
f7eac6d
Requires: python3-hidapi hidapi >= 0.7.99
f7eac6d
Requires: python3-mnemonic python-%{libname}-common
f7eac6d
f7eac6d
%description -n python3-%{libname} %_description
f7eac6d
f7eac6d
f7eac6d
%package -n python-%{libname}-common
f7eac6d
Summary: udev rules for Ledger devices
f7eac6d
f7eac6d
%description -n python-%{libname}-common
f7eac6d
%{summary}.
f7eac6d
f7eac6d
f7eac6d
%prep
f7eac6d
%autosetup -n %{srcname}-%{version}
f7eac6d
rm -rf btchip_python.egg-info
f7eac6d
cp %{SOURCE2} .
f7eac6d
f7eac6d
%build
f7eac6d
%py3_build
f7eac6d
f7eac6d
f7eac6d
%install
f7eac6d
%py3_install
f7eac6d
mkdir -p %{buildroot}%{_udevrulesdir}
f7eac6d
install -m644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/20-ledger.rules
f7eac6d
f7eac6d
f7eac6d
%check
f7eac6d
# Tests try to contact PyPi
f7eac6d
f7eac6d
f7eac6d
%files -n python3-%{libname}
f7eac6d
%license LICENSE
f7eac6d
%doc README.md
f7eac6d
%{python3_sitelib}/btchip_python-*.egg-info/
f7eac6d
%{python3_sitelib}/btchip/
f7eac6d
f7eac6d
%files -n python-%{libname}-common
f7eac6d
%{_udevrulesdir}/20-ledger.rules
f7eac6d
f7eac6d
f7eac6d
%changelog
f7eac6d
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.32-4
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
f7eac6d
f7eac6d
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.32-3
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
f7eac6d
f7eac6d
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.1.32-2
f7eac6d
- Rebuilt for Python 3.10
f7eac6d
f7eac6d
* Thu Apr 01 2021 Jonny Heggheim <hegjon@gmail.com> - 0.1.32-1
f7eac6d
- Update to 0.1.32
f7eac6d
f7eac6d
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.31-3
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f7eac6d
f7eac6d
* Wed Dec 09 2020 Jonny Heggheim <hegjon@gmail.com> - 0.1.31-2
f7eac6d
- Updated udev-rules
f7eac6d
f7eac6d
* Wed Dec 09 2020 Jonny Heggheim <hegjon@gmail.com> - 0.1.31-1
f7eac6d
- Update to 0.1.31
f7eac6d
f7eac6d
* Wed Dec 09 2020 Jonny Heggheim <hegjon@gmail.com> - 0.1.30-1
f7eac6d
- Update to 0.1.30
f7eac6d
f7eac6d
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.28-8
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f7eac6d
f7eac6d
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.1.28-7
f7eac6d
- Rebuilt for Python 3.9
f7eac6d
f7eac6d
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.28-6
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f7eac6d
f7eac6d
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.28-5
f7eac6d
- Rebuilt for Python 3.8.0rc1 (#1748018)
f7eac6d
f7eac6d
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.28-4
f7eac6d
- Rebuilt for Python 3.8
f7eac6d
f7eac6d
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.28-3
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f7eac6d
f7eac6d
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.28-2
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f7eac6d
f7eac6d
* Tue Nov 27 2018 Michael Goodwin <xenithorb@fedoraproject.org> - v0.1.28-1
f7eac6d
- Update to 0.1.28
f7eac6d
f7eac6d
* Mon Oct 01 2018 Jonny Heggheim <hegjon@gmail.com> - 0.1.26-4
f7eac6d
- Removed Python 2 sub-package
f7eac6d
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
f7eac6d
f7eac6d
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.26-3
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f7eac6d
f7eac6d
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1.26-2
f7eac6d
- Rebuilt for Python 3.7
f7eac6d
f7eac6d
* Tue Mar 13 2018 Michael Goodwin <xenithorb@fedoraproject.org> - v0.1.26-1
f7eac6d
- Update to 0.1.26 (0.1.25 was a same-day release)
f7eac6d
f7eac6d
* Thu Feb 22 2018 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.24-1
f7eac6d
- Update to 0.1.24
f7eac6d
f7eac6d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.21-5
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f7eac6d
f7eac6d
* Mon Oct 16 2017 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.21-4
f7eac6d
- Fix ${sum} mistake in common package
f7eac6d
f7eac6d
* Mon Oct 16 2017 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.21-3
f7eac6d
- Add python-mnemonic dependency for BIP39 support during dongle setup
f7eac6d
- New sub-package: python3-btchip (upstream added py3 support) (#1499686)
f7eac6d
- New sub-package: python-btchip-common - current for the btchip udev rules
f7eac6d
    - Add udev rules (20-hw1.rules) for automatic device recognition
f7eac6d
f7eac6d
* Wed Oct 04 2017 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.21-2
f7eac6d
- Update to 0.1.21
f7eac6d
f7eac6d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.20-2
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f7eac6d
f7eac6d
* Thu May 04 2017 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.20-1
f7eac6d
- Update to 0.1.20
f7eac6d
f7eac6d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.18-4
f7eac6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f7eac6d
f7eac6d
* Wed Jan 4 2017 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.18-3
f7eac6d
- Final finishing touches after package review
f7eac6d
f7eac6d
* Tue Jan 3 2017 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.18-2
f7eac6d
- Improve SPEC for most recent python packaging guidelines
f7eac6d
f7eac6d
* Sun Jan 1 2017 Michael Goodwin <xenithorb@fedoraproject.org> - 0.1.18-1
f7eac6d
- Initial packaging of btchip-python for Fedora