3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: U2F host library for interacting with a U2F device over USB
8 Summary(pl.UTF-8): Biblioteka hosta U2F do współpracy z urządzeniami U2F po USB
13 Group: Libraries/Python
14 #Source0Download: https://github.com/google/pyu2f/releases
15 Source0: https://github.com/google/pyu2f/archive/%{version}/pyu2f-%{version}.tar.gz
16 # Source0-md5: 5b10b5a1619466504b31f81b3945519c
17 Patch0: %{name}-deps.patch
18 Patch1: %{name}-mock.patch
19 URL: https://github.com/google/pyu2f
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-setuptools
26 BuildRequires: python-mock >= 1.0.1
27 BuildRequires: python-pyfakefs >= 2.4
28 BuildRequires: python-pytest
29 BuildRequires: python-six
33 BuildRequires: python3-modules >= 1:3.6
34 BuildRequires: python3-setuptools
36 BuildRequires: python3-pyfakefs >= 2.4
37 BuildRequires: python3-pytest
38 BuildRequires: python3-six
41 Requires: python-modules
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 pyu2f is a Python based U2F host library for Linux, Windows, and
48 MacOS. It provides functionality for interacting with a U2F device
51 %description -l pl.UTF-8
52 pyu2f to pythonowa biblioteka hosta U2F dla Linuksa, Windows i
53 MacOS-a. Zapewnia funkcjonalność potrzebną do współpracy z
54 urządzeniami U2F po USB.
56 %package -n python3-pyu2f
57 Summary: U2F host library for interacting with a U2F device over USB
58 Summary(pl.UTF-8): Biblioteka hosta U2F do współpracy z urządzeniami U2F po USB
59 Group: Libraries/Python
60 Requires: python3-modules
63 %description -n python3-pyu2f
64 pyu2f is a Python based U2F host library for Linux, Windows, and
65 MacOS. It provides functionality for interacting with a U2F device
68 %description -n python3-pyu2f -l pl.UTF-8
69 pyu2f to pythonowa biblioteka hosta U2F dla Linuksa, Windows i
70 MacOS-a. Zapewnia funkcjonalność potrzebną do współpracy z
71 urządzeniami U2F po USB.
74 %setup -q -n pyu2f-%{version}
82 %{?with_tests:py.test-2 pyu2f/tests}
88 %{?with_tests:py.test-3 pyu2f/tests}
92 rm -rf $RPM_BUILD_ROOT
105 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
111 %{py_sitescriptdir}/pyu2f
112 %{py_sitescriptdir}/pyu2f-%{version}-py*.egg-info
116 %files -n python3-pyu2f
117 %defattr(644,root,root,755)
119 %{py3_sitescriptdir}/pyu2f
120 %{py3_sitescriptdir}/pyu2f-%{version}-py*.egg-info