]>
Commit | Line | Data |
---|---|---|
d3fdcd8c | 1 | # |
27adeffa | 2 | # Conditional build: |
a2a4a27b JB |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
5 | %bcond_without tests # unit tests | |
27adeffa | 6 | |
7055521e AM |
7 | %define module isodate |
8 | Summary: An ISO 8601 date/time/duration parser and formater | |
c68c9790 | 9 | Summary(pl.UTF-8): Moduł analizujący i formatujący daty/czas/okresy w formacie ISO 8601 |
7055521e | 10 | Name: python-%{module} |
c8a2ef53 JP |
11 | Version: 0.6.1 |
12 | Release: 1 | |
27adeffa | 13 | License: BSD |
a2a4a27b JB |
14 | Group: Libraries/Python |
15 | #Source0Download: https://pypi.python.org/simple/isodate/ | |
16 | Source0: https://pypi.python.org/packages/source/i/isodate/isodate-%{version}.tar.gz | |
c8a2ef53 | 17 | # Source0-md5: 1a310658b30a48641bafb5652ad91c40 |
a2a4a27b | 18 | URL: https://pypi.python.org/pypi/isodate/ |
27adeffa | 19 | %if %{with python2} |
d3fdcd8c | 20 | BuildRequires: python-devel >= 1:2.6 |
d3fdcd8c | 21 | BuildRequires: python-modules >= 1:2.6 |
a2a4a27b | 22 | BuildRequires: python-setuptools |
27adeffa JK |
23 | %endif |
24 | %if %{with python3} | |
a2a4a27b | 25 | BuildRequires: python3-2to3 >= 1:3.2 |
d3fdcd8c | 26 | BuildRequires: python3-devel >= 1:3.2 |
d3fdcd8c | 27 | BuildRequires: python3-modules >= 1:3.2 |
a2a4a27b | 28 | BuildRequires: python3-setuptools |
27adeffa | 29 | %endif |
7055521e | 30 | BuildRequires: rpm-pythonprov |
a2a4a27b | 31 | BuildRequires: rpmbuild(macros) >= 1.714 |
d3fdcd8c | 32 | Requires: python-modules >= 1:2.6 |
7055521e AM |
33 | BuildArch: noarch |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
7055521e AM |
37 | This module implements ISO 8601 date, time and duration parsing. The |
38 | implementation follows ISO8601:2004 standard, and implements only | |
39 | date/time representations mentioned in the standard. If something is | |
40 | not mentioned there, then it is treated as non existent, and not as an | |
41 | allowed option. | |
42 | ||
c68c9790 JB |
43 | %description -l pl.UTF-8 |
44 | Ten moduł zawiera implementację analizy daty, czasu i okresów w | |
45 | formacie ISO 8601. Implementacja jest zgodna ze standardem | |
46 | ISO8601:2004 i zawiera tylko reprezentacje daty/czasu opisane w | |
47 | standardzie. | |
48 | ||
27adeffa JK |
49 | %package -n python3-%{module} |
50 | Summary: An ISO 8601 date/time/duration parser and formater | |
51 | Summary(pl.UTF-8): Moduł analizujący i formatujący daty/czas/okresy w formacie ISO 8601 | |
52 | Group: Libraries/Python | |
53 | Requires: python3-modules | |
54 | ||
55 | %description -n python3-%{module} | |
56 | This module implements ISO 8601 date, time and duration parsing. The | |
57 | implementation follows ISO8601:2004 standard, and implements only | |
58 | date/time representations mentioned in the standard. If something is | |
59 | not mentioned there, then it is treated as non existent, and not as an | |
60 | allowed option. | |
61 | ||
62 | %description -n python3-%{module} -l pl.UTF-8 | |
63 | Ten moduł zawiera implementację analizy daty, czasu i okresów w | |
64 | formacie ISO 8601. Implementacja jest zgodna ze standardem | |
65 | ISO8601:2004 i zawiera tylko reprezentacje daty/czasu opisane w | |
66 | standardzie. | |
67 | ||
7055521e AM |
68 | %prep |
69 | %setup -q -n isodate-%{version} | |
70 | ||
71 | %build | |
27adeffa | 72 | %if %{with python2} |
590bbf96 | 73 | %py_build %{?with_tests:test} |
27adeffa JK |
74 | %endif |
75 | ||
76 | %if %{with python3} | |
590bbf96 | 77 | %py3_build %{?with_tests:test} |
27adeffa | 78 | %endif |
7055521e AM |
79 | |
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
27adeffa JK |
82 | |
83 | %if %{with python2} | |
590bbf96 | 84 | %py_install |
7055521e AM |
85 | |
86 | %py_postclean | |
a2a4a27b JB |
87 | # tests |
88 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/isodate/tests | |
27adeffa JK |
89 | %endif |
90 | ||
91 | %if %{with python3} | |
590bbf96 | 92 | %py3_install |
a2a4a27b | 93 | |
a2a4a27b JB |
94 | # tests |
95 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/isodate/tests | |
27adeffa | 96 | %endif |
7055521e AM |
97 | |
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
27adeffa | 103 | %doc CHANGES.txt README.rst TODO.txt |
7055521e | 104 | %dir %{py_sitescriptdir}/isodate |
c68c9790 JB |
105 | %{py_sitescriptdir}/isodate/*.py[co] |
106 | %{py_sitescriptdir}/isodate-%{version}-py*.egg-info | |
27adeffa JK |
107 | |
108 | %files -n python3-%{module} | |
109 | %defattr(644,root,root,755) | |
110 | %doc CHANGES.txt README.rst TODO.txt | |
111 | %dir %{py3_sitescriptdir}/isodate | |
112 | %{py3_sitescriptdir}/isodate/*.py | |
113 | %{py3_sitescriptdir}/isodate/__pycache__ | |
27adeffa | 114 | %{py3_sitescriptdir}/isodate-%{version}-py*.egg-info |