]> git.pld-linux.org Git - packages/python-fido2.git/blame - python-fido2.spec
- updated to 0.9.3
[packages/python-fido2.git] / python-fido2.spec
CommitLineData
7fb26094
JB
1#
2# Conditional build:
20594f9d 3%bcond_with tests # unit tests
7fb26094 4%bcond_without python2 # CPython 2.x module
6847d4d6 5%bcond_with python3 # CPython 3.x module [built from python3-fido2.spec]
7fb26094
JB
6
7Summary: Python 2 based FIDO 2.0 library
8Summary(pl.UTF-8): Biblioteka FIDO 2.0 dla Pythona 2
9Name: python-fido2
6847d4d6
JB
10# keep 0.9.x here for python2 support
11Version: 0.9.3
12Release: 1
7fb26094
JB
13# Yubico code is BSD licensed; includes also:
14# pyudf (Apache 2.0)
15# public suffix list (MPL 2.0)
16License: BSD, Apache v2.0, MPL v2.0
17Group: Libraries/Python
18#Source0Download: https://github.com/Yubico/python-fido2/releases
19Source0: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz
6847d4d6 20# Source0-md5: d8d2a123c7ccd87e6517fee251126f53
7fb26094
JB
21Patch0: %{name}-mock.patch
22URL: https://developers.yubico.com/python-fido2/
23BuildRequires: rpm-pythonprov
24BuildRequires: rpmbuild(macros) >= 1.714
25%if %{with python2}
26BuildRequires: python-modules >= 1:2.7
27BuildRequires: python-setuptools
28%if %{with tests}
29BuildRequires: python-cryptography >= 1.0
30BuildRequires: python-mock >= 1.0.1
31BuildRequires: python-pyfakefs >= 2.4
32BuildRequires: python-six
33%endif
34%endif
35%if %{with python3}
36BuildRequires: python3-modules >= 1:3.4
37BuildRequires: python3-setuptools
38%if %{with tests}
39BuildRequires: python3-cryptography >= 1.0
40BuildRequires: python3-pyfakefs >= 2.4
41BuildRequires: python3-six
42%endif
43%endif
44Requires: python-cryptography >= 1.0
45Requires: python-modules >= 1:2.7
46Requires: python-six
47BuildArch: noarch
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%description
51This package provides library functionality for communicating with a
52FIDO device over USB as well as verifying attestation and assertion
53signatures.
54
55%description -l pl.UTF-8
56Ten pakiet zawiera bibliotekę funkcji do komunikacji z urządzeniami
57FIDO po USB, a także weryfikowania podpisów poświadczeń i zapewnień.
58
59%package -n python3-fido2
60Summary: Python 3 based FIDO 2.0 library
61Summary(pl.UTF-8): Biblioteka FIDO 2.0 dla Pythona 3
62Group: Libraries/Python
63Requires: python3-cryptography >= 1.0
64Requires: python3-modules >= 1:3.4
65Requires: python3-six
66
67%description -n python3-fido2
68This package provides library functionality for communicating with a
69FIDO device over USB as well as verifying attestation and assertion
70signatures.
71
72%description -n python3-fido2 -l pl.UTF-8
73Ten pakiet zawiera bibliotekę funkcji do komunikacji z urządzeniami
74FIDO po USB, a także weryfikowania podpisów poświadczeń i zapewnień.
75
76%prep
77%setup -q -n fido2-%{version}
78%patch0 -p1
79
80%build
81%if %{with python2}
82%py_build
83
84%if %{with tests}
85%{__python} -m unittest discover -s test
86%endif
87%endif
88
89%if %{with python3}
90%py3_build
91
92%if %{with tests}
93%{__python3} -m unittest discover -s test
94%endif
95%endif
96
97%install
98rm -rf $RPM_BUILD_ROOT
99
100%if %{with python2}
101%py_install
102
103%py_postclean
104%endif
105
106%if %{with python3}
107%py3_install
108%endif
109
110%if %{with python2}
111install -d $RPM_BUILD_ROOT%{_examplesdir}/python-fido2-%{version}
112cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-fido2-%{version}
113%endif
114%if %{with python3}
115install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-fido2-%{version}
116cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-fido2-%{version}
117%endif
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python2}
123%files
124%defattr(644,root,root,755)
125%doc COPYING NEWS README.adoc
126%{py_sitescriptdir}/fido2
127%{py_sitescriptdir}/fido2-%{version}-py*.egg-info
128%{_examplesdir}/python-fido2-%{version}
129%endif
130
131%if %{with python3}
132%files -n python3-fido2
133%defattr(644,root,root,755)
134%doc COPYING NEWS README.adoc
135%{py3_sitescriptdir}/fido2
136%{py3_sitescriptdir}/fido2-%{version}-py*.egg-info
137%{_examplesdir}/python3-fido2-%{version}
138%endif
This page took 0.268716 seconds and 4 git commands to generate.