92 lines
3.7 KiB
RPMSpec
92 lines
3.7 KiB
RPMSpec
|
#
|
||
|
# spec file for package
|
||
|
#
|
||
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||
|
#
|
||
|
# All modifications and additions to the file contributed by third parties
|
||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||
|
# upon. The license for this file, and modifications and additions to the
|
||
|
# file, is the same license as for the pristine package itself (unless the
|
||
|
# license for the pristine package is not an Open Source License, in which
|
||
|
# case the license is the MIT License). An "Open Source License" is a
|
||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||
|
# published by the Open Source Initiative.
|
||
|
|
||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
|
#
|
||
|
%define short_name tzlocal
|
||
|
|
||
|
Name: python-tzlocal
|
||
|
Version: 1.1.2
|
||
|
Release: 0
|
||
|
License: CC0-1.0
|
||
|
Summary: Tzinfo object for the local timezone
|
||
|
Url: https://pypi.python.org/pypi/tzlocal/
|
||
|
Group: Development/Languages/Python
|
||
|
Source: https://pypi.python.org/packages/source/t/%{short_name}/%{short_name}-%{version}.zip
|
||
|
BuildRequires: unzip
|
||
|
BuildRequires: python-setuptools
|
||
|
BuildRequires: fdupes
|
||
|
BuildRequires: python-pytz
|
||
|
Requires: python-pytz
|
||
|
BuildArch: noarch
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
|
||
|
%description
|
||
|
This Python module returns a tzinfo object with the local timezone information under Unix and Win-32. It requires pytz, and returns pytz tzinfo objects.
|
||
|
|
||
|
This module attempts to fix a glaring hole in pytz, that there is no way to get the local timezone information, unless you know the zoneinfo name, and under several Linux distros that's hard or impossible to figure out.
|
||
|
|
||
|
With tzlocal you only need to call get_localzone() and you will get a tzinfo object with the local time zone info. On some Unices you will still not get to know what the timezone name is, but you don't need that when you have the tzinfo file. However, if the timezone name is readily available it will be used.
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n %{short_name}-%{version}
|
||
|
|
||
|
%build
|
||
|
python setup.py build
|
||
|
|
||
|
%install
|
||
|
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
|
||
|
%fdupes -s %{buildroot}
|
||
|
|
||
|
%check
|
||
|
python setup.py test
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%doc README.rst MANIFEST.in LICENSE.txt CHANGES.txt
|
||
|
|
||
|
%dir %{python_sitelib}/tzlocal
|
||
|
%dir %{python_sitelib}/tzlocal-*.egg-info
|
||
|
%dir %{python_sitelib}/tzlocal/test_data
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/localtime
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/localtime/etc
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/timezone
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/timezone/etc
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/timezone_setting
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/timezone_setting/etc
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/timezone_setting/etc/conf.d
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/zone_setting
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/zone_setting/etc
|
||
|
%dir %{python_sitelib}/tzlocal/test_data/zone_setting/etc/sysconfig
|
||
|
|
||
|
%{python_sitelib}/tzlocal-*.egg-info/PKG-INFO
|
||
|
%{python_sitelib}/tzlocal-*.egg-info/SOURCES.txt
|
||
|
%{python_sitelib}/tzlocal-*.egg-info/dependency_links.txt
|
||
|
%{python_sitelib}/tzlocal-*.egg-info/requires.txt
|
||
|
%{python_sitelib}/tzlocal-*.egg-info/top_level.txt
|
||
|
%{python_sitelib}/tzlocal-*.egg-info/zip-safe
|
||
|
%{python_sitelib}/tzlocal/__init__.py*
|
||
|
%{python_sitelib}/tzlocal/darwin.py*
|
||
|
%{python_sitelib}/tzlocal/test_data/Harare
|
||
|
%{python_sitelib}/tzlocal/test_data/localtime/etc/localtime
|
||
|
%{python_sitelib}/tzlocal/test_data/timezone/etc/timezone
|
||
|
%{python_sitelib}/tzlocal/test_data/timezone_setting/etc/conf.d/clock
|
||
|
%{python_sitelib}/tzlocal/test_data/zone_setting/etc/sysconfig/clock
|
||
|
%{python_sitelib}/tzlocal/tests.py*
|
||
|
%{python_sitelib}/tzlocal/unix.py*
|
||
|
%{python_sitelib}/tzlocal/win32.py*
|
||
|
%{python_sitelib}/tzlocal/windows_tz.py*
|
||
|
|
||
|
%changelog
|