2012-03-21 20:38:53 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-pytz
|
|
|
|
#
|
2019-01-09 18:21:14 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-03-21 20:38:53 +01:00
|
|
|
#
|
|
|
|
# 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.
|
2013-04-29 14:34:30 +02:00
|
|
|
|
2018-12-04 14:57:15 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-03-21 20:38:53 +01:00
|
|
|
#
|
|
|
|
|
2013-04-29 14:34:30 +02:00
|
|
|
|
2017-04-05 17:18:15 +02:00
|
|
|
%define oldpython python
|
2017-03-17 08:49:45 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2012-03-21 20:38:53 +01:00
|
|
|
Name: python-pytz
|
2019-02-18 16:04:19 +01:00
|
|
|
Version: 2018.9
|
2012-03-21 20:38:53 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: World timezone definitions, modern and historical
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
2019-02-18 16:04:19 +01:00
|
|
|
URL: https://pythonhosted.org/pytz/
|
2018-02-19 21:21:31 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.tar.gz
|
|
|
|
Source2: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.tar.gz.asc
|
2018-07-01 08:43:46 +02:00
|
|
|
Source90: %{name}.keyring
|
2014-08-12 15:50:27 +02:00
|
|
|
# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken
|
|
|
|
Patch0: fix-tests.patch
|
2017-03-14 13:59:46 +01:00
|
|
|
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
|
|
|
|
Patch1: system_zoneinfo.patch
|
2017-06-29 09:02:05 +02:00
|
|
|
# PATCH-FIX-UPSTREAM 0001-Fix-tests-for-older-timezone-versions.patch -- https://code.launchpad.net/~toabctl/pytz/+git/pytz/+merge/326419
|
|
|
|
Patch2: 0001-Fix-tests-for-older-timezone-versions.patch
|
2019-02-18 16:04:19 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-01-09 18:21:14 +01:00
|
|
|
# pytest is required only because of 2.7 stdlib test runner, python3
|
|
|
|
# unittest runner is sufficient.
|
|
|
|
BuildRequires: %{python_module pytest}
|
2017-03-17 08:49:45 +01:00
|
|
|
# Test requirements
|
2018-07-01 08:43:46 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2017-03-17 08:49:45 +01:00
|
|
|
BuildRequires: timezone
|
2019-02-18 16:04:19 +01:00
|
|
|
Requires: python-base
|
2017-03-17 08:49:45 +01:00
|
|
|
Requires: timezone
|
2018-07-01 08:43:46 +02:00
|
|
|
BuildArch: noarch
|
2017-04-05 17:18:15 +02:00
|
|
|
%ifpython2
|
|
|
|
Provides: %{oldpython}-tz = %{version}
|
|
|
|
Obsoletes: %{oldpython}-tz < %{version}
|
|
|
|
%endif
|
2017-03-17 08:49:45 +01:00
|
|
|
%python_subpackages
|
2017-03-07 18:18:52 +01:00
|
|
|
|
2012-03-21 20:38:53 +01:00
|
|
|
%description
|
|
|
|
pytz - World Timezone Definitions for Python
|
|
|
|
pytz brings the Olson tz database into Python. This library allows
|
|
|
|
accurate and cross platform timezone calculations using Python 2.4
|
|
|
|
or higher. It also solves the issue of ambiguous times at the end
|
|
|
|
of daylight savings, which you can read more about in the Python
|
|
|
|
Library Reference (``datetime.tzinfo``).
|
|
|
|
|
|
|
|
Amost all of the Olson timezones are supported.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pytz-%{version}
|
2019-01-09 18:21:14 +01:00
|
|
|
%autopatch -p1
|
2017-03-17 08:49:45 +01:00
|
|
|
|
2013-01-15 15:14:40 +01:00
|
|
|
# For rpmlint warning: remove shebang from python library:
|
|
|
|
sed -i '/^#!/d' ./pytz/tzfile.py
|
2012-03-21 20:38:53 +01:00
|
|
|
|
|
|
|
%build
|
2017-03-17 08:49:45 +01:00
|
|
|
%python_build
|
2012-03-21 20:38:53 +01:00
|
|
|
|
|
|
|
%install
|
2017-03-17 08:49:45 +01:00
|
|
|
%python_install
|
|
|
|
%python_expand rm -fr %{buildroot}%{$python_sitelib}/pytz/zoneinfo
|
2019-02-18 16:04:19 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2012-03-21 20:38:53 +01:00
|
|
|
|
2014-08-12 15:50:27 +02:00
|
|
|
%check
|
2019-01-09 18:21:14 +01:00
|
|
|
%python_expand PYTHONPATH=. py.test-%{$python_bin_suffix} -v pytz/tests
|
2012-03-21 20:38:53 +01:00
|
|
|
|
2017-03-17 08:49:45 +01:00
|
|
|
%files %{python_files}
|
2018-07-01 08:43:46 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.txt
|
2012-03-21 20:38:53 +01:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|