]>
Commit | Line | Data |
---|---|---|
6de66cc6 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
e1a75b88 JB |
6 | Summary: An implementation of time.monotonic() for Python 2 |
7 | Summary(pl.UTF-8): Implementacja time.monotinic() dla Pythona 2 | |
6de66cc6 | 8 | Name: python-monotonic |
6a3243f7 | 9 | Version: 1.6 |
d8bf897c | 10 | Release: 2 |
e1a75b88 | 11 | License: Apache v2.0 |
6de66cc6 | 12 | Group: Libraries/Python |
e1a75b88 | 13 | #Source0Download: https://pypi.org/simple/monotonic/ |
6de66cc6 | 14 | Source0: https://files.pythonhosted.org/packages/source/m/monotonic/monotonic-%{version}.tar.gz |
6a3243f7 | 15 | # Source0-md5: 9fbb889cdc67cb909046e8e366c9fea1 |
e1a75b88 | 16 | URL: https://pypi.org/project/monotonic/ |
6de66cc6 JK |
17 | BuildRequires: rpm-pythonprov |
18 | BuildRequires: rpmbuild(macros) >= 1.714 | |
19 | %if %{with python2} | |
e1a75b88 | 20 | BuildRequires: python-modules >= 1:2.5 |
6de66cc6 JK |
21 | BuildRequires: python-setuptools |
22 | %endif | |
23 | %if %{with python3} | |
e1a75b88 | 24 | BuildRequires: python3-modules >= 1:3.2 |
6de66cc6 JK |
25 | BuildRequires: python3-setuptools |
26 | %endif | |
e1a75b88 | 27 | Requires: python-modules >= 1:2.5 |
6de66cc6 JK |
28 | BuildArch: noarch |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | This module provides a monotonic() function which returns the value | |
33 | (in fractional seconds) of a clock which never goes backwards. | |
34 | ||
35 | On Python 3.3 or newer, monotonic will be an alias of time.monotonic | |
36 | from the standard library. On older versions, it will fall back to an | |
37 | equivalent implementation. | |
38 | ||
39 | %description -l pl.UTF-8 | |
e1a75b88 JB |
40 | Ten moduł udostępnia funkcję monotonic(), zwracającą wartość (w |
41 | ułamkach sekundy) zegara, który nigdy się nie cofa. | |
42 | ||
43 | Dla Pythona 3.3 lub nowszego monotonic będzie aliasem dla funkcji | |
44 | time.monotonic z biblioteki standardowej. Dla starszych wersji | |
45 | odwołuje się do równoważnej implementacji. | |
6de66cc6 JK |
46 | |
47 | %package -n python3-monotonic | |
e1a75b88 JB |
48 | Summary: An implementation of time.monotonic() for Python < 3.3 |
49 | Summary(pl.UTF-8): Implementacja time.monotinic() dla Pythona < 3.3 | |
6de66cc6 | 50 | Group: Libraries/Python |
e1a75b88 | 51 | Requires: python3-modules >= 1:3.2 |
6de66cc6 JK |
52 | |
53 | %description -n python3-monotonic | |
54 | This module provides a monotonic() function which returns the value | |
55 | (in fractional seconds) of a clock which never goes backwards. | |
56 | ||
57 | On Python 3.3 or newer, monotonic will be an alias of time.monotonic | |
58 | from the standard library. On older versions, it will fall back to an | |
59 | equivalent implementation. | |
60 | ||
e1a75b88 JB |
61 | %description -n python3-monotonic -l pl.UTF-8 |
62 | Ten moduł udostępnia funkcję monotonic(), zwracającą wartość (w | |
63 | ułamkach sekundy) zegara, który nigdy się nie cofa. | |
64 | ||
65 | Dla Pythona 3.3 lub nowszego monotonic będzie aliasem dla funkcji | |
66 | time.monotonic z biblioteki standardowej. Dla starszych wersji | |
67 | odwołuje się do równoważnej implementacji. | |
68 | ||
6de66cc6 JK |
69 | %prep |
70 | %setup -q -n monotonic-%{version} | |
71 | ||
72 | %build | |
73 | %if %{with python2} | |
e1a75b88 | 74 | %py_build |
6de66cc6 JK |
75 | %endif |
76 | ||
77 | %if %{with python3} | |
e1a75b88 | 78 | %py3_build |
6de66cc6 JK |
79 | %endif |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %if %{with python2} | |
85 | %py_install | |
86 | ||
87 | %py_postclean | |
88 | %endif | |
89 | ||
90 | %if %{with python3} | |
91 | %py3_install | |
92 | %endif | |
93 | ||
94 | %clean | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %if %{with python2} | |
98 | %files | |
99 | %defattr(644,root,root,755) | |
e1a75b88 | 100 | %doc README.md |
6de66cc6 JK |
101 | %{py_sitescriptdir}/monotonic.py[co] |
102 | %{py_sitescriptdir}/monotonic-%{version}-py*.egg-info | |
103 | %endif | |
104 | ||
105 | %if %{with python3} | |
106 | %files -n python3-monotonic | |
107 | %defattr(644,root,root,755) | |
e1a75b88 | 108 | %doc README.md |
6de66cc6 | 109 | %{py3_sitescriptdir}/monotonic.py |
e1a75b88 | 110 | %{py3_sitescriptdir}/__pycache__/monotonic.cpython-*.py[co] |
6de66cc6 JK |
111 | %{py3_sitescriptdir}/monotonic-%{version}-py*.egg-info |
112 | %endif |