]> git.pld-linux.org Git - packages/python-monotonic.git/blob - python-monotonic.spec
rebuild with tests and docs
[packages/python-monotonic.git] / python-monotonic.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 Summary:        An implementation of time.monotonic() for Python 2
7 Summary(pl.UTF-8):      Implementacja time.monotinic() dla Pythona 2
8 Name:           python-monotonic
9 Version:        1.6
10 Release:        4
11 License:        Apache v2.0
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/monotonic/
14 Source0:        https://files.pythonhosted.org/packages/source/m/monotonic/monotonic-%{version}.tar.gz
15 # Source0-md5:  9fbb889cdc67cb909046e8e366c9fea1
16 URL:            https://pypi.org/project/monotonic/
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.5
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules >= 1:3.2
25 BuildRequires:  python3-setuptools
26 %endif
27 Requires:       python-modules >= 1:2.5
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
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.
46
47 %package -n python3-monotonic
48 Summary:        An implementation of time.monotonic() for Python < 3.3
49 Summary(pl.UTF-8):      Implementacja time.monotinic() dla Pythona < 3.3
50 Group:          Libraries/Python
51 Requires:       python3-modules >= 1:3.2
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
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
69 %prep
70 %setup -q -n monotonic-%{version}
71
72 %build
73 %if %{with python2}
74 %py_build
75 %endif
76
77 %if %{with python3}
78 %py3_build
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)
100 %doc README.md
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)
108 %doc README.md
109 %{py3_sitescriptdir}/monotonic.py
110 %{py3_sitescriptdir}/__pycache__/monotonic.cpython-*.py[co]
111 %{py3_sitescriptdir}/monotonic-%{version}-py*.egg-info
112 %endif
This page took 0.097247 seconds and 4 git commands to generate.