Accepting request 311266 from home:jkeil:branches:devel:languages:python
- Reworked spec file * Bump version * Use github upstream url * Improve description and summary * Use tarball instead of zip * Minimize %files section OBS-URL: https://build.opensuse.org/request/show/311266 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tzlocal?expand=0&rev=2
This commit is contained in:
parent
88ab1b405d
commit
f0e0277ee2
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 9 09:20:46 UTC 2015 - jkeil@suse.de
|
||||||
|
|
||||||
|
- Reworked spec file
|
||||||
|
* Bump version
|
||||||
|
* Use github upstream url
|
||||||
|
* Improve description and summary
|
||||||
|
* Use tarball instead of zip
|
||||||
|
* Minimize %files section
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 6 09:53:03 UTC 2014 - seiler@b1-systems.de
|
Thu Nov 6 09:53:03 UTC 2014 - seiler@b1-systems.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package
|
# spec file for package python-tzlocal
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -14,39 +14,51 @@
|
|||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
%define short_name tzlocal
|
|
||||||
|
|
||||||
Name: python-tzlocal
|
|
||||||
Version: 1.1.2
|
%define modname tzlocal
|
||||||
|
Name: python-%{modname}
|
||||||
|
Version: 1.1.3
|
||||||
Release: 0
|
Release: 0
|
||||||
|
Summary: Provides tzinfo object for the local timezone
|
||||||
License: CC0-1.0
|
License: CC0-1.0
|
||||||
Summary: Tzinfo object for the local timezone
|
Group: Development/Libraries/Python
|
||||||
Url: https://pypi.python.org/pypi/tzlocal/
|
Url: https://github.com/regebro/%{modname}
|
||||||
Group: Development/Languages/Python
|
Source: http://pypi.python.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz
|
||||||
Source: https://pypi.python.org/packages/source/t/%{short_name}/%{short_name}-%{version}.zip
|
|
||||||
BuildRequires: unzip
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-pytz
|
BuildRequires: python-pytz
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
|
||||||
Requires: python-pytz
|
Requires: python-pytz
|
||||||
BuildArch: noarch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%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 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.
|
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.
|
Also, with Windows different timezone system using pytz isn’t of much use unless
|
||||||
|
you separately configure the zoneinfo timezone name.
|
||||||
|
|
||||||
|
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
|
%prep
|
||||||
%setup -q -n %{short_name}-%{version}
|
%setup -q -n %{modname}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
%fdupes -s %{buildroot}
|
%fdupes -s %{buildroot}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -54,38 +66,8 @@ python setup.py test
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.rst MANIFEST.in LICENSE.txt CHANGES.txt
|
%doc README.rst MANIFEST.in LICENSE.txt CHANGES.txt PKG-INFO
|
||||||
|
%{python_sitelib}/%{modname}
|
||||||
%dir %{python_sitelib}/tzlocal
|
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info
|
||||||
%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
|
%changelog
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:4d9ddb8d5eab086e3a7c504c6e994ffa85df43e40da4d6be776218be051c677a
|
|
||||||
size 22504
|
|
3
tzlocal-1.1.3.tar.gz
Normal file
3
tzlocal-1.1.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1950d112ed1b717683280d54f1e7a4533564d479127162cbf247bd0fb3708983
|
||||||
|
size 15854
|
Loading…
Reference in New Issue
Block a user