3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 Summary: tzinfo object for the local timezone
12 Group: Development/Languages/Python
13 Source0: https://pypi.python.org/packages/source/t/tzlocal/%{module}-%{version}.tar.gz
14 # Source0-md5: c0877603ff9de71cd8ca6ee2b50d2ebd
15 URL: https://github.com/regebro/tzlocal
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.714
19 BuildRequires: python >= 1:2.7
20 BuildRequires: python-setuptools
23 BuildRequires: python3 >= 1:3.6
24 BuildRequires: python3-setuptools
26 Requires: python-modules >= 1:2.7
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 This Python module returns a tzinfo object with the local timezone
33 information under Unix and Win-32. It requires pytz, and returns pytz
36 This module attempts to fix a glaring hole in pytz, that there is no
37 way to get the local timezone information, unless you know the
38 zoneinfo name, and under several Linux distros that’s hard or
39 impossible to figure out.
41 %package -n python3-%{module}
42 Summary: tzinfo object for the local timezone for Python 3
43 Group: Development/Languages/Python
44 Requires: python3-modules >= 1:3.6
45 Requires: python3-pytz
47 %description -n python3-%{module}
48 This Python module returns a tzinfo object with the local timezone
49 information under Unix and Win-32. It requires pytz, and returns pytz
52 This module attempts to fix a glaring hole in pytz, that there is no
53 way to get the local timezone information, unless you know the
54 zoneinfo name, and under several Linux distros that’s hard or
55 impossible to figure out.
58 %setup -q -n %{module}-%{version}
70 rm -rf $RPM_BUILD_ROOT
83 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
88 %doc CHANGES.txt README.rst
89 %dir %{py_sitescriptdir}/%{module}
90 %{py_sitescriptdir}/%{module}/*.py[co]
91 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
95 %files -n python3-%{module}
96 %defattr(644,root,root,755)
97 %doc CHANGES.txt README.rst
98 %dir %{py3_sitescriptdir}/%{module}
99 %{py3_sitescriptdir}/%{module}/*.py
100 %{py3_sitescriptdir}/%{module}/__pycache__
101 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info