]> git.pld-linux.org Git - packages/python-pyu2f.git/blob - python-pyu2f.spec
92ec0da2e74c0f80eec81e80e3fb8b3e22922594
[packages/python-pyu2f.git] / python-pyu2f.spec
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
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
9 Name:           python-pyu2f
10 Version:        0.1.4
11 Release:        5
12 License:        Apache v2.0
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
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-mock >= 1.0.1
27 BuildRequires:  python-pyfakefs >= 2.4
28 BuildRequires:  python-pytest
29 BuildRequires:  python-six
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.6
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-pyfakefs >= 2.4
37 BuildRequires:  python3-pytest
38 BuildRequires:  python3-six
39 %endif
40 %endif
41 Requires:       python-modules
42 Requires:       python-six
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 pyu2f is a Python based U2F host library for Linux, Windows, and
48 MacOS. It provides functionality for interacting with a U2F device
49 over USB.
50
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.
55
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
61 Requires:       python3-six
62
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
66 over USB.
67
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.
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
92 rm -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
105 rm -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.047925 seconds and 2 git commands to generate.