]>
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 JB |
10 | Version: 2.2 |
11 | Release: 1 | |
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 |
3bd4f362 | 18 | %if %{with python2} |
8665830c JB |
19 | BuildRequires: python-modules >= 1:2.6 |
20 | BuildRequires: python-six | |
3bd4f362 JB |
21 | %endif |
22 | %if %{with python3} | |
23 | BuildRequires: python3-modules >= 1:3.2 | |
24 | BuildRequires: python3-six | |
25 | %endif | |
925dc3fc | 26 | BuildRequires: rpm-pythonprov |
fbb08368 | 27 | BuildRequires: rpmbuild(macros) >= 0.219 |
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 JB |
93 | %if %{with python2} |
94 | %{__python} setup.py build --build-base build-2 | |
95 | %endif | |
96 | ||
97 | %if %{with python3} | |
98 | %{__python3} setup.py build --build-base build-3 | |
99 | %endif | |
925dc3fc MK |
100 | |
101 | %install | |
102 | rm -rf $RPM_BUILD_ROOT | |
3bd4f362 JB |
103 | |
104 | %if %{with python2} | |
105 | %{__python} setup.py \ | |
106 | build --build-base build-2 \ | |
107 | install \ | |
108 | --skip-build \ | |
109 | --optimize=2 \ | |
110 | --root=$RPM_BUILD_ROOT | |
925dc3fc | 111 | |
fbb08368 ER |
112 | %py_postclean |
113 | ||
4c88eeb4 | 114 | # NOTE: Not sure but seems zoneinfo is needed under windows only |
fbb08368 | 115 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/dateutil/zoneinfo |
3bd4f362 JB |
116 | %endif |
117 | ||
118 | %if %{with python3} | |
119 | %{__python3} setup.py \ | |
120 | build --build-base build-3 \ | |
121 | install \ | |
122 | --skip-build \ | |
123 | --optimize=2 \ | |
124 | --root=$RPM_BUILD_ROOT | |
125 | ||
126 | # NOTE: Not sure but seems zoneinfo is needed under windows only | |
127 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/dateutil/zoneinfo | |
128 | %endif | |
4c88eeb4 | 129 | |
925dc3fc MK |
130 | %clean |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
3bd4f362 | 133 | %if %{with python2} |
925dc3fc MK |
134 | %files |
135 | %defattr(644,root,root,755) | |
2398f4c2 | 136 | %doc LICENSE NEWS README |
9ede2745 | 137 | %{py_sitescriptdir}/dateutil |
3bd4f362 JB |
138 | %{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info |
139 | %endif | |
140 | ||
141 | %if %{with python3} | |
142 | %files -n python3-dateutil | |
143 | %defattr(644,root,root,755) | |
144 | %doc LICENSE NEWS README | |
145 | %{py3_sitescriptdir}/dateutil | |
146 | %{py3_sitescriptdir}/python_dateutil-%{version}-py*.egg-info | |
147 | %endif |