]>
Commit | Line | Data |
---|---|---|
3bd4f362 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
4c88eeb4 | 6 | %define module dateutil |
3bd4f362 | 7 | Summary: Extensions to the standard Python datetime module |
4edbeb34 | 8 | Summary(pl.UTF-8): Rozszerzenia modułu datetime języka Python |
925dc3fc | 9 | Name: python-dateutil |
8665830c | 10 | Version: 2.2 |
4c13489a | 11 | Release: 5 |
69396a30 | 12 | License: BSD |
925dc3fc | 13 | Group: Libraries/Python |
8665830c JB |
14 | Source0: https://pypi.python.org/packages/source/p/python-dateutil/python-%{module}-%{version}.tar.gz |
15 | # Source0-md5: c1f654d0ff7e33999380a8ba9783fd5c | |
07c95c93 | 16 | Patch0: system-zoneinfo.patch |
8665830c | 17 | URL: http://labix.org/python-dateutil |
0fb699fa | 18 | BuildRequires: rpm-pythonprov |
0038bef1 | 19 | BuildRequires: rpmbuild(macros) >= 1.710 |
3bd4f362 | 20 | %if %{with python2} |
8665830c | 21 | BuildRequires: python-modules >= 1:2.6 |
0fb699fa | 22 | BuildRequires: python-setuptools |
3bd4f362 JB |
23 | %endif |
24 | %if %{with python3} | |
25 | BuildRequires: python3-modules >= 1:3.2 | |
0fb699fa | 26 | BuildRequires: python3-setuptools |
3bd4f362 | 27 | %endif |
8665830c JB |
28 | Requires: python-six |
29 | Requires: tzdata >= 2013h | |
fbb08368 | 30 | BuildArch: noarch |
925dc3fc MK |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
88fadcb5 JB |
34 | The dateutil module provides powerful extensions to the standard |
35 | datetime module, available in Python 2.3+. Allows: | |
36 | - computing of relative deltas (next month, next year, next monday, | |
37 | last week of month, etc), | |
38 | - computing of dates based on very flexible recurrence rules, using a | |
39 | superset of the [WWW] iCalendar specification, | |
925dc3fc MK |
40 | - parsing of RFC strings, |
41 | - peneric parsing of dates in almost any string format. | |
42 | ||
3bd4f362 JB |
43 | This package contains Python 2.x module. |
44 | ||
fc872035 JR |
45 | %description -l pl.UTF-8 |
46 | Moduł dateutil jest potężnym rozszerzeniem standardowego modułu | |
47 | datetime, dostępnego w Pythonie 2.3+. Pozwala na: | |
48 | - obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek, | |
49 | ostatni tydzień miesiąca itp.), | |
88fadcb5 | 50 | - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z |
fc872035 JR |
51 | użyciem nadzbioru specyfikacji [WWW] iCalendar, |
52 | - analizę łańcuchow znakowych RFC, | |
53 | - analizę dat w prawie każdym formacie. | |
925dc3fc | 54 | |
3bd4f362 JB |
55 | Ten pakiet zawiera moduł Pythona 2.x. |
56 | ||
57 | %package -n python3-dateutil | |
58 | Summary: Extensions to the standard Python datetime module | |
59 | Summary(pl.UTF-8): Rozszerzenia modułu datetime języka Python | |
60 | Group: Libraries/Python | |
61 | Requires: python3-six | |
62 | Requires: tzdata >= 2013h | |
63 | ||
64 | %description -n python3-dateutil | |
65 | The dateutil module provides powerful extensions to the standard | |
66 | datetime module, available in Python 2.3+. Allows: | |
67 | - computing of relative deltas (next month, next year, next monday, | |
68 | last week of month, etc), | |
69 | - computing of dates based on very flexible recurrence rules, using a | |
70 | superset of the [WWW] iCalendar specification, | |
71 | - parsing of RFC strings, | |
72 | - peneric parsing of dates in almost any string format. | |
73 | ||
74 | This package contains Python 3.x module. | |
75 | ||
76 | %description -n python3-dateutil -l pl.UTF-8 | |
77 | Moduł dateutil jest potężnym rozszerzeniem standardowego modułu | |
78 | datetime, dostępnego w Pythonie 2.3+. Pozwala na: | |
79 | - obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek, | |
80 | ostatni tydzień miesiąca itp.), | |
81 | - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z | |
82 | użyciem nadzbioru specyfikacji [WWW] iCalendar, | |
83 | - analizę łańcuchow znakowych RFC, | |
84 | - analizę dat w prawie każdym formacie. | |
85 | ||
86 | Ten pakiet zawiera moduł Pythona 3.x. | |
87 | ||
925dc3fc MK |
88 | %prep |
89 | %setup -q | |
07c95c93 | 90 | %patch0 -p1 |
925dc3fc MK |
91 | |
92 | %build | |
3bd4f362 | 93 | %if %{with python2} |
4dcd62fb | 94 | %py_build |
3bd4f362 JB |
95 | %endif |
96 | ||
97 | %if %{with python3} | |
4dcd62fb | 98 | %py3_build |
3bd4f362 | 99 | %endif |
925dc3fc MK |
100 | |
101 | %install | |
102 | rm -rf $RPM_BUILD_ROOT | |
3bd4f362 JB |
103 | |
104 | %if %{with python2} | |
4dcd62fb | 105 | %py_install |
925dc3fc | 106 | |
fbb08368 ER |
107 | %py_postclean |
108 | ||
4c88eeb4 | 109 | # NOTE: Not sure but seems zoneinfo is needed under windows only |
fbb08368 | 110 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/dateutil/zoneinfo |
3bd4f362 JB |
111 | %endif |
112 | ||
113 | %if %{with python3} | |
4dcd62fb | 114 | %py3_install |
3bd4f362 JB |
115 | |
116 | # NOTE: Not sure but seems zoneinfo is needed under windows only | |
117 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/dateutil/zoneinfo | |
118 | %endif | |
4c88eeb4 | 119 | |
925dc3fc MK |
120 | %clean |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
3bd4f362 | 123 | %if %{with python2} |
925dc3fc MK |
124 | %files |
125 | %defattr(644,root,root,755) | |
2398f4c2 | 126 | %doc LICENSE NEWS README |
9ede2745 | 127 | %{py_sitescriptdir}/dateutil |
3bd4f362 JB |
128 | %{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info |
129 | %endif | |
130 | ||
131 | %if %{with python3} | |
132 | %files -n python3-dateutil | |
133 | %defattr(644,root,root,755) | |
134 | %doc LICENSE NEWS README | |
135 | %{py3_sitescriptdir}/dateutil | |
136 | %{py3_sitescriptdir}/python_dateutil-%{version}-py*.egg-info | |
137 | %endif |