]> git.pld-linux.org Git - packages/python-pyu2f.git/blame - python-pyu2f.spec
rebuild with python 3.10
[packages/python-pyu2f.git] / python-pyu2f.spec
CommitLineData
5606cf03
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: U2F host library for interacting with a U2F device over USB
8Summary(pl.UTF-8): Biblioteka hosta U2F do współpracy z urządzeniami U2F po USB
9Name: python-pyu2f
10Version: 0.1.4
72801c33 11Release: 6
5606cf03
JB
12License: Apache v2.0
13Group: Libraries/Python
14#Source0Download: https://github.com/google/pyu2f/releases
15Source0: https://github.com/google/pyu2f/archive/%{version}/pyu2f-%{version}.tar.gz
16# Source0-md5: 5b10b5a1619466504b31f81b3945519c
17Patch0: %{name}-deps.patch
18Patch1: %{name}-mock.patch
19URL: https://github.com/google/pyu2f
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.7
24BuildRequires: python-setuptools
25%if %{with tests}
26BuildRequires: python-mock >= 1.0.1
27BuildRequires: python-pyfakefs >= 2.4
28BuildRequires: python-pytest
29BuildRequires: python-six
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-modules >= 1:3.6
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-pyfakefs >= 2.4
37BuildRequires: python3-pytest
38BuildRequires: python3-six
39%endif
40%endif
41Requires: python-modules
42Requires: python-six
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47pyu2f is a Python based U2F host library for Linux, Windows, and
48MacOS. It provides functionality for interacting with a U2F device
49over USB.
50
51%description -l pl.UTF-8
52pyu2f to pythonowa biblioteka hosta U2F dla Linuksa, Windows i
53MacOS-a. Zapewnia funkcjonalność potrzebną do współpracy z
54urządzeniami U2F po USB.
55
56%package -n python3-pyu2f
57Summary: U2F host library for interacting with a U2F device over USB
58Summary(pl.UTF-8): Biblioteka hosta U2F do współpracy z urządzeniami U2F po USB
59Group: Libraries/Python
60Requires: python3-modules
61Requires: python3-six
62
63%description -n python3-pyu2f
64pyu2f is a Python based U2F host library for Linux, Windows, and
65MacOS. It provides functionality for interacting with a U2F device
66over USB.
67
68%description -n python3-pyu2f -l pl.UTF-8
69pyu2f to pythonowa biblioteka hosta U2F dla Linuksa, Windows i
70MacOS-a. Zapewnia funkcjonalność potrzebną do współpracy z
71urządzeniami U2F po USB.
72
73%prep
74%setup -q -n pyu2f-%{version}
75%patch0 -p1
76%patch1 -p1
77
78%build
79%if %{with python2}
80%py_build
81
82%{?with_tests:py.test-2 pyu2f/tests}
83%endif
84
85%if %{with python3}
86%py3_build
87
88%{?with_tests:py.test-3 pyu2f/tests}
89%endif
90
91%install
92rm -rf $RPM_BUILD_ROOT
93
94%if %{with python2}
95%py_install
96
97%py_postclean
98%endif
99
100%if %{with python3}
101%py3_install
102%endif
103
104%clean
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python2}
108%files
109%defattr(644,root,root,755)
110%doc README.md
111%{py_sitescriptdir}/pyu2f
112%{py_sitescriptdir}/pyu2f-%{version}-py*.egg-info
113%endif
114
115%if %{with python3}
116%files -n python3-pyu2f
117%defattr(644,root,root,755)
118%doc README.md
119%{py3_sitescriptdir}/pyu2f
120%{py3_sitescriptdir}/pyu2f-%{version}-py*.egg-info
121%endif
This page took 0.182126 seconds and 4 git commands to generate.