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