]> git.pld-linux.org Git - packages/python-pytz.git/blame - python-pytz.spec
- updated to 2014.4
[packages/python-pytz.git] / python-pytz.spec
CommitLineData
0089fbb2
AF
1#
2# Conditional build:
3%bcond_without python2 # Python 2.x modules
4%bcond_without python3 # Python 3.x modules
5#
6d89867b
ER
6# NOTE
7# - as we use system tzdata package, keeping this pkg up to the latest is
8# pointless if only data has changed
1d169444 9%define module pytz
1d169444 10Summary: pytz - Olson timezone database in Python
e0abfc56 11Summary(pl.UTF-8): pytz - baza stref czasowych Olsona w Pythonie
1d169444 12Name: python-%{module}
9e927ab2 13Version: 2014.4
76c65347 14Release: 1
3342699d 15License: MIT
1d169444 16Group: Libraries/Python
9e927ab2
JB
17Source0: https://pypi.python.org/packages/source/p/pytz/%{module}-%{version}.tar.bz2
18# Source0-md5: 69078b2e80eeb4e74c4c93089a101bcc
b3e14e5b 19Patch0: zoneinfo.patch
76c65347 20URL: http://pytz.sourceforge.net/
0dbea9c1 21BuildRequires: sed >= 4.0
0089fbb2 22%if %{with python2}
a17a0084 23BuildRequires: python-devel >= 1:2.3
3342699d 24BuildRequires: python >= 1:2.3
0089fbb2
AF
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
28%endif
82cff73e 29BuildRequires: rpmbuild(macros) >= 1.469
0089fbb2 30%if %{with python2}
3342699d 31Requires: python >= 1:2.3
0089fbb2 32%endif
3342699d 33Requires: tzdata >= %{version}
1d169444
MG
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38pytz brings the Olson tz database into Python. This library allows
39accurate and cross platform timezone calculations using Python 2.3 or
40higher.
41
a49ed86c
JR
42%description -l pl.UTF-8
43pytz dodaje do Pythona moduł umożliwiający odpytywanie bazy stref
44czasowych Olsona. Moduł ten umożliwia przeprowadzanie dokładnych,
3342699d 45niezależnych od platformy obliczeń uwzględniających strefy czasowe
a49ed86c 46przy użyciu Pythona w wersji co najmniej 2.3.
1d169444 47
0089fbb2
AF
48%package -n python3-%{module}
49Summary: pytz - Olson timezone database in Python 3.x
50Summary(pl.UTF-8): pytz - baza stref czasowych Olsona w Pythonie 3.x
51Group: Libraries/Python
52Requires: tzdata >= %{version}
53
54%description -n python3-%{module}
55pytz brings the Olson tz database into Python. This library allows
56accurate and cross platform timezone calculations using Python 3.x
57
58%description -n python3-%{module} -l pl.UTF-8
59pytz dodaje do Pythona moduł umożliwiający odpytywanie bazy stref
60czasowych Olsona. Moduł ten umożliwia przeprowadzanie dokładnych,
61niezależnych od platformy obliczeń uwzględniających strefy czasowe
62przy użyciu Pythona 3.x
63
1d169444
MG
64%prep
65%setup -q -n %{module}-%{version}
6d89867b
ER
66
67# strip zones list before patching
0dbea9c1
JB
68%{__sed} -i -e "/^all_timezones = \\\\/,/^ 'Zulu'/d" \
69 -e "/^common_timezones = \\\\/,/ 'UTC'/d" pytz/__init__.py
6d89867b 70
b3e14e5b 71%patch0 -p1
1d169444
MG
72
73%build
0089fbb2
AF
74%if %{with python2}
75%{__python} setup.py build --build-base py2
82cff73e 76%py_lint
0089fbb2
AF
77%endif
78%if %{with python3}
79%{__python3} setup.py build --build-base py3
80%endif
1d169444
MG
81
82%install
83rm -rf $RPM_BUILD_ROOT
0089fbb2
AF
84%if %{with python2}
85%{__python} setup.py \
86 build --build-base py2 \
87 install \
1d169444 88 --root=$RPM_BUILD_ROOT \
0089fbb2 89 --optimize=2
b3e14e5b 90
3342699d 91%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pytz/zoneinfo
63825ff4 92%py_postclean
0089fbb2
AF
93%endif
94
95%if %{with python3}
96%{__python3} setup.py \
97 build --build-base py3 \
98 install \
99 --root=$RPM_BUILD_ROOT \
100 --optimize=2
101%endif
1d169444
MG
102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
0089fbb2 106%if %{with python2}
1d169444
MG
107%files
108%defattr(644,root,root,755)
3342699d 109%doc CHANGES.txt LICENSE.txt README.txt
1d169444 110%{py_sitescriptdir}/pytz
2df1d822 111%{py_sitescriptdir}/pytz-%{version}-py*.egg-info
0089fbb2
AF
112%endif
113
114%if %{with python3}
115%files -n python3-%{module}
116%defattr(644,root,root,755)
117%doc CHANGES.txt LICENSE.txt README.txt
118%{py3_sitescriptdir}/pytz
119%{py3_sitescriptdir}/pytz-%{version}-py*.egg-info
120%endif
This page took 0.540232 seconds and 4 git commands to generate.