From fc54993add52c951090d0f85b681ced137fa87d27a890e8de894776a6d8190b4 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 7 Mar 2017 17:18:52 +0000
Subject: [PATCH 01/14] Accepting request 466178 from
home:AndreasStieger:branches:devel:languages:python
update to 2016.10 bsc#1027705 and singlespec
OBS-URL: https://build.opensuse.org/request/show/466178
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=44
---
python-pytz.changes | 13 ++++++++++++
python-pytz.spec | 32 ++++++++++++++---------------
pytz-2016.10.tar.bz2 | 3 +++
pytz-2016.10.tar.bz2.asc | 7 +++++++
pytz-2016.4.tar.bz2 | 3 ---
pytz-2016.4.tar.bz2.asc | 7 -------
system_zoneinfo.patch | 44 ----------------------------------------
7 files changed, 38 insertions(+), 71 deletions(-)
create mode 100644 pytz-2016.10.tar.bz2
create mode 100644 pytz-2016.10.tar.bz2.asc
delete mode 100644 pytz-2016.4.tar.bz2
delete mode 100644 pytz-2016.4.tar.bz2.asc
delete mode 100644 system_zoneinfo.patch
diff --git a/python-pytz.changes b/python-pytz.changes
index 0e7d648..1d3db83 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,3 +1,16 @@
+-------------------------------------------------------------------
+Thu Mar 2 16:39:42 UTC 2017 - astieger@suse.com
+
+- update to 2016.10:
+ * includes IANA 2016j
+ * No longer fails with timezone-2017a bsc#1027705
+ * drop upstreamed system_zoneinfo.patch
+
+-------------------------------------------------------------------
+Mon Dec 19 17:43:19 UTC 2016 - jmatejek@suse.com
+
+- update for multipython build
+
-------------------------------------------------------------------
Mon Apr 25 08:10:27 UTC 2016 - astieger@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index 3a82382..179370b 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-pytz
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,24 +16,24 @@
#
+%{?!python_module:%define python_module() python-%1 python3-%1}
Name: python-pytz
-Version: 2016.4
+Version: 2016.10
Release: 0
Summary: World timezone definitions, modern and historical
License: MIT
Group: Development/Languages/Python
Url: http://pytz.sourceforge.net
-Source: https://pypi.python.org/packages/f4/7d/7c0c85e9c64a75dde11bc9d3e1adc4e09a42ce7cdb873baffa1598118709/pytz-2016.4.tar.bz2
-Source2: https://pypi.python.org/packages/f4/7d/7c0c85e9c64a75dde11bc9d3e1adc4e09a42ce7cdb873baffa1598118709/pytz-2016.4.tar.bz2.asc
+Source: https://pypi.python.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2
+Source2: https://pypi.python.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2.asc
Source90: pytz.keyring
# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken
Patch0: fix-tests.patch
-# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
-Patch1: system_zoneinfo.patch
Requires: timezone
+BuildRequires: %{python_module devel}
+BuildRequires: %{python_module nose}
BuildRequires: fdupes
-BuildRequires: python-devel
-BuildRequires: python-nose
+BuildRequires: python-rpm-macros
# Tests will use this package
BuildRequires: timezone
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -46,6 +46,8 @@ BuildArch: noarch
Provides: python-tz = 2014b
Obsoletes: python-tz < 2014b
+%python_subpackages
+
%description
pytz - World Timezone Definitions for Python
pytz brings the Olson tz database into Python. This library allows
@@ -60,28 +62,24 @@ Amost all of the Olson timezones are supported.
%setup -q -n pytz-%{version}
# Disable test which is not working (and documented so)
%patch0 -p1
-%if 0%{?suse_version} >= 1310
-# Use system tz database
-%patch1 -p1
-%endif
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./pytz/tzfile.py
%build
-python setup.py build
+%python_build
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
# Remove the pytz zoneinfo only if we use the system tz database
%if 0%{?suse_version} >= 1310
rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
%endif
-%fdupes %{buildroot}%{python_sitelib}
+%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
%check
-nosetests
+%{python_expand nosetests-%$python_bin_suffix}
-%files
+%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
%{python_sitelib}/*
diff --git a/pytz-2016.10.tar.bz2 b/pytz-2016.10.tar.bz2
new file mode 100644
index 0000000..e291a5f
--- /dev/null
+++ b/pytz-2016.10.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7016b2c4fa075c564b81c37a252a5fccf60d8964aa31b7f5eae59aeb594ae02b
+size 172920
diff --git a/pytz-2016.10.tar.bz2.asc b/pytz-2016.10.tar.bz2.asc
new file mode 100644
index 0000000..6dda017
--- /dev/null
+++ b/pytz-2016.10.tar.bz2.asc
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iEYEABECAAYFAlhGjDcACgkQAfqZj7rGN0qkzACdHUgHv+qfjc6+vHuInFZQD5od
+DVwAniNLVslM9oeAXOWa9oQge2gbJuws
+=4xm3
+-----END PGP SIGNATURE-----
diff --git a/pytz-2016.4.tar.bz2 b/pytz-2016.4.tar.bz2
deleted file mode 100644
index 7da7786..0000000
--- a/pytz-2016.4.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ee7c751544e35a7b7fb5e3fb25a49dade37d51e70a93e5107f10575d7102c311
-size 171959
diff --git a/pytz-2016.4.tar.bz2.asc b/pytz-2016.4.tar.bz2.asc
deleted file mode 100644
index cf82a4f..0000000
--- a/pytz-2016.4.tar.bz2.asc
+++ /dev/null
@@ -1,7 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1
-
-iEYEABECAAYFAlcaIxIACgkQAfqZj7rGN0pJ2ACfbHdK2WdyrymaAVFBBnSC7OAI
-bd8AoIX2+ga13T2KGW3HPwj1fjtJLNUL
-=ZpuM
------END PGP SIGNATURE-----
diff --git a/system_zoneinfo.patch b/system_zoneinfo.patch
deleted file mode 100644
index 7048c67..0000000
--- a/system_zoneinfo.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Index: pytz-2014.9/pytz/__init__.py
-===================================================================
---- pytz-2014.9.orig/pytz/__init__.py
-+++ pytz-2014.9/pytz/__init__.py
-@@ -25,11 +25,6 @@ __all__ = [
-
- import sys, datetime, os.path, gettext
-
--try:
-- from pkg_resources import resource_stream
--except ImportError:
-- resource_stream = None
--
- from pytz.exceptions import AmbiguousTimeError
- from pytz.exceptions import InvalidTimeError
- from pytz.exceptions import NonExistentTimeError
-@@ -86,13 +81,7 @@ def open_resource(name):
- for part in name_parts:
- if part == os.path.pardir or os.path.sep in part:
- raise ValueError('Bad path segment: %r' % part)
-- filename = os.path.join(os.path.dirname(__file__),
-- 'zoneinfo', *name_parts)
-- if not os.path.exists(filename) and resource_stream is not None:
-- # http://bugs.launchpad.net/bugs/383171 - we avoid using this
-- # unless absolutely necessary to help when a broken version of
-- # pkg_resources is installed.
-- return resource_stream(__name__, 'zoneinfo/' + name)
-+ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
- return open(filename, 'rb')
-
-
-Index: pytz-2014.9/pytz/tzfile.py
-===================================================================
---- pytz-2014.9.orig/pytz/tzfile.py
-+++ pytz-2014.9/pytz/tzfile.py
-@@ -127,7 +127,7 @@ def build_tzinfo(zone, fp):
- if __name__ == '__main__':
- import os.path
- from pprint import pprint
-- base = os.path.join(os.path.dirname(__file__), 'zoneinfo')
-+ base = '/usr/share/zoneinfo'
- tz = build_tzinfo('Australia/Melbourne',
- open(os.path.join(base,'Australia','Melbourne'), 'rb'))
- tz = build_tzinfo('US/Eastern',
From d0013242657ca60d41e684e6cc79b552dd398550af8351a7f19cb1221c0edd01 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 7 Mar 2017 17:21:59 +0000
Subject: [PATCH 02/14] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=45
---
python-pytz.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python-pytz.spec b/python-pytz.spec
index 179370b..f39c411 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -24,8 +24,8 @@ Summary: World timezone definitions, modern and historical
License: MIT
Group: Development/Languages/Python
Url: http://pytz.sourceforge.net
-Source: https://pypi.python.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2
-Source2: https://pypi.python.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2.asc
+Source: https://files.pythonhosted.org/packages/source/p/pytz//pytz-%{version}.tar.bz2
+Source2: https://files.pythonhosted.org/packages/source/p/pytz//pytz-%{version}.tar.bz2.asc
Source90: pytz.keyring
# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken
Patch0: fix-tests.patch
From d11b90bbf677f0d45285d319c99585fed3e4c0e5172613cb60b72cd79a81793a Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 7 Mar 2017 17:46:20 +0000
Subject: [PATCH 03/14] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=46
---
python-pytz.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python-pytz.spec b/python-pytz.spec
index f39c411..d95af39 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -24,8 +24,8 @@ Summary: World timezone definitions, modern and historical
License: MIT
Group: Development/Languages/Python
Url: http://pytz.sourceforge.net
-Source: https://files.pythonhosted.org/packages/source/p/pytz//pytz-%{version}.tar.bz2
-Source2: https://files.pythonhosted.org/packages/source/p/pytz//pytz-%{version}.tar.bz2.asc
+Source: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.tar.bz2
+Source2: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.tar.bz2.asc
Source90: pytz.keyring
# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken
Patch0: fix-tests.patch
From 8a0132e6ad1d23639a748e0f6a9eecc2ce9a87d7f9ce0843f3483633a3def953 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 7 Mar 2017 17:46:51 +0000
Subject: [PATCH 04/14] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=47
---
pytz-2016.10.tar.bz2 | 3 ---
1 file changed, 3 deletions(-)
delete mode 100644 pytz-2016.10.tar.bz2
diff --git a/pytz-2016.10.tar.bz2 b/pytz-2016.10.tar.bz2
deleted file mode 100644
index e291a5f..0000000
--- a/pytz-2016.10.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7016b2c4fa075c564b81c37a252a5fccf60d8964aa31b7f5eae59aeb594ae02b
-size 172920
From 4904e9e795dd381f2661a2898304515bacb23d2c73815c24c464b5123096eddd Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 7 Mar 2017 17:46:56 +0000
Subject: [PATCH 05/14] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=48
---
pytz-2016.10.tar.bz2.asc | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 pytz-2016.10.tar.bz2.asc
diff --git a/pytz-2016.10.tar.bz2.asc b/pytz-2016.10.tar.bz2.asc
deleted file mode 100644
index 6dda017..0000000
--- a/pytz-2016.10.tar.bz2.asc
+++ /dev/null
@@ -1,7 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
-
-iEYEABECAAYFAlhGjDcACgkQAfqZj7rGN0qkzACdHUgHv+qfjc6+vHuInFZQD5od
-DVwAniNLVslM9oeAXOWa9oQge2gbJuws
-=4xm3
------END PGP SIGNATURE-----
From 0f6ae3369998639dcc45e751e57261a98608aa15169065a5016553382003661a Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 7 Mar 2017 17:47:06 +0000
Subject: [PATCH 06/14] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=49
---
pytz-2016.10.tar.bz2.asc | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 pytz-2016.10.tar.bz2.asc
diff --git a/pytz-2016.10.tar.bz2.asc b/pytz-2016.10.tar.bz2.asc
new file mode 100644
index 0000000..6dda017
--- /dev/null
+++ b/pytz-2016.10.tar.bz2.asc
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iEYEABECAAYFAlhGjDcACgkQAfqZj7rGN0qkzACdHUgHv+qfjc6+vHuInFZQD5od
+DVwAniNLVslM9oeAXOWa9oQge2gbJuws
+=4xm3
+-----END PGP SIGNATURE-----
From e64642b0f0693dbf3ef92a073dedfcbcc31bed2fe8fb819fce11f86047c60986 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 7 Mar 2017 17:47:14 +0000
Subject: [PATCH 07/14] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=50
---
pytz-2016.10.tar.bz2 | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 pytz-2016.10.tar.bz2
diff --git a/pytz-2016.10.tar.bz2 b/pytz-2016.10.tar.bz2
new file mode 100644
index 0000000..e291a5f
--- /dev/null
+++ b/pytz-2016.10.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7016b2c4fa075c564b81c37a252a5fccf60d8964aa31b7f5eae59aeb594ae02b
+size 172920
From e43e0a69943ff0663c0d62fae9d2e0fffc71e33ee768f8d5f9168bff19d00464 Mon Sep 17 00:00:00 2001
From: Jan Matejek
Date: Tue, 14 Mar 2017 12:59:46 +0000
Subject: [PATCH 08/14] Accepting request 479121 from
home:AndreasStieger:branches:devel:languages:python
- re-add and fix system_zoneinfo.patch which was dropped in error
boo#1029120
OBS-URL: https://build.opensuse.org/request/show/479121
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=51
---
python-pytz.changes | 6 ++++++
python-pytz.spec | 6 ++++++
system_zoneinfo.patch | 38 ++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+)
create mode 100644 system_zoneinfo.patch
diff --git a/python-pytz.changes b/python-pytz.changes
index 1d3db83..3db1599 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Mon Mar 13 18:08:26 UTC 2017 - astieger@suse.com
+
+- re-add and fix system_zoneinfo.patch which was dropped in error
+ boo#1029120
+
-------------------------------------------------------------------
Thu Mar 2 16:39:42 UTC 2017 - astieger@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index d95af39..3d0f100 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -29,6 +29,8 @@ Source2: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{ver
Source90: pytz.keyring
# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken
Patch0: fix-tests.patch
+# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
+Patch1: system_zoneinfo.patch
Requires: timezone
BuildRequires: %{python_module devel}
BuildRequires: %{python_module nose}
@@ -62,6 +64,10 @@ Amost all of the Olson timezones are supported.
%setup -q -n pytz-%{version}
# Disable test which is not working (and documented so)
%patch0 -p1
+%if 0%{?suse_version} >= 1310
+# Use system tz database
+%patch1 -p1
+%endif
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./pytz/tzfile.py
diff --git a/system_zoneinfo.patch b/system_zoneinfo.patch
new file mode 100644
index 0000000..4225e74
--- /dev/null
+++ b/system_zoneinfo.patch
@@ -0,0 +1,38 @@
+Index: pytz-2016.10/pytz/__init__.py
+===================================================================
+--- pytz-2016.10.orig/pytz/__init__.py
++++ pytz-2016.10/pytz/__init__.py
+@@ -81,19 +81,7 @@ def open_resource(name):
+ for part in name_parts:
+ if part == os.path.pardir or os.path.sep in part:
+ raise ValueError('Bad path segment: %r' % part)
+- filename = os.path.join(os.path.dirname(__file__),
+- 'zoneinfo', *name_parts)
+- if not os.path.exists(filename):
+- # http://bugs.launchpad.net/bugs/383171 - we avoid using this
+- # unless absolutely necessary to help when a broken version of
+- # pkg_resources is installed.
+- try:
+- from pkg_resources import resource_stream
+- except ImportError:
+- resource_stream = None
+-
+- if resource_stream is not None:
+- return resource_stream(__name__, 'zoneinfo/' + name)
++ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
+ return open(filename, 'rb')
+
+
+Index: pytz-2016.10/pytz/tzfile.py
+===================================================================
+--- pytz-2016.10.orig/pytz/tzfile.py
++++ pytz-2016.10/pytz/tzfile.py
+@@ -127,7 +127,7 @@ def build_tzinfo(zone, fp):
+ if __name__ == '__main__':
+ import os.path
+ from pprint import pprint
+- base = os.path.join(os.path.dirname(__file__), 'zoneinfo')
++ base = '/usr/share/zoneinfo'
+ tz = build_tzinfo('Australia/Melbourne',
+ open(os.path.join(base,'Australia','Melbourne'), 'rb'))
+ tz = build_tzinfo('US/Eastern',
From b447ace799d37e04594309c5d67abd6a79d28fed3637e86bc521543494bb0b42 Mon Sep 17 00:00:00 2001
From: Jan Matejek
Date: Tue, 14 Mar 2017 13:23:11 +0000
Subject: [PATCH 09/14] Accepting request 479251 from
devel:languages:python:singlespec
- singlespec tweaks
OBS-URL: https://build.opensuse.org/request/show/479251
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=52
---
python-pytz.changes | 5 +++++
python-pytz.spec | 15 +++++++--------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/python-pytz.changes b/python-pytz.changes
index 3db1599..7ccf395 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Mon Mar 13 19:31:04 UTC 2017 - jmatejek@suse.com
+
+- singlespec tweaks
+
-------------------------------------------------------------------
Mon Mar 13 18:08:26 UTC 2017 - astieger@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index 3d0f100..da8c3ce 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -16,7 +16,8 @@
#
-%{?!python_module:%define python_module() python-%1 python3-%1}
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define oldpython python
Name: python-pytz
Version: 2016.10
Release: 0
@@ -39,14 +40,12 @@ BuildRequires: python-rpm-macros
# Tests will use this package
BuildRequires: timezone
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
-Provides: python-tz = 2014b
-Obsoletes: python-tz < 2014b
+%ifpython2
+Provides: %{oldpython}-tz = 2014b
+Obsoletes: %{oldpython}-tz < 2014b
+%endif
%python_subpackages
@@ -83,7 +82,7 @@ rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
%check
-%{python_expand nosetests-%$python_bin_suffix}
+%python_exec %{_bindir}/nosetests
%files %{python_files}
%defattr(-,root,root,-)
From 7250380e5183db98601b46b977fc805ecd68e5dc193066669e8f7b2849060a9d Mon Sep 17 00:00:00 2001
From: Jan Matejek
Date: Tue, 14 Mar 2017 16:28:49 +0000
Subject: [PATCH 10/14] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=53
---
python-pytz.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python-pytz.spec b/python-pytz.spec
index da8c3ce..60eb9cb 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -82,7 +82,7 @@ rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
%check
-%python_exec %{_bindir}/nosetests
+%python_expand nosetests-%{$python_bin_suffix}
%files %{python_files}
%defattr(-,root,root,-)
From f15077769185a23e7df5dcf76880d87ff5ec55fffe9b3abf3b21740fb90ce776 Mon Sep 17 00:00:00 2001
From: Andreas Stieger
Date: Wed, 15 Mar 2017 14:06:01 +0000
Subject: [PATCH 11/14] take out singlespec changes to submit to factory,
putting back in later
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=54
---
python-pytz.changes | 17 -----------------
python-pytz.spec | 27 ++++++++++++---------------
2 files changed, 12 insertions(+), 32 deletions(-)
diff --git a/python-pytz.changes b/python-pytz.changes
index 7ccf395..57e279f 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,26 +1,9 @@
--------------------------------------------------------------------
-Mon Mar 13 19:31:04 UTC 2017 - jmatejek@suse.com
-
-- singlespec tweaks
-
--------------------------------------------------------------------
-Mon Mar 13 18:08:26 UTC 2017 - astieger@suse.com
-
-- re-add and fix system_zoneinfo.patch which was dropped in error
- boo#1029120
-
-------------------------------------------------------------------
Thu Mar 2 16:39:42 UTC 2017 - astieger@suse.com
- update to 2016.10:
* includes IANA 2016j
* No longer fails with timezone-2017a bsc#1027705
- * drop upstreamed system_zoneinfo.patch
-
--------------------------------------------------------------------
-Mon Dec 19 17:43:19 UTC 2016 - jmatejek@suse.com
-
-- update for multipython build
-------------------------------------------------------------------
Mon Apr 25 08:10:27 UTC 2016 - astieger@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index 60eb9cb..753ccd5 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -16,8 +16,6 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define oldpython python
Name: python-pytz
Version: 2016.10
Release: 0
@@ -33,21 +31,20 @@ Patch0: fix-tests.patch
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
Patch1: system_zoneinfo.patch
Requires: timezone
-BuildRequires: %{python_module devel}
-BuildRequires: %{python_module nose}
BuildRequires: fdupes
-BuildRequires: python-rpm-macros
+BuildRequires: python-devel
+BuildRequires: python-nose
# Tests will use this package
BuildRequires: timezone
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if 0%{?suse_version} && 0%{?suse_version} <= 1110
+%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%else
BuildArch: noarch
-
-%ifpython2
-Provides: %{oldpython}-tz = 2014b
-Obsoletes: %{oldpython}-tz < 2014b
%endif
-%python_subpackages
+Provides: python-tz = 2014b
+Obsoletes: python-tz < 2014b
%description
pytz - World Timezone Definitions for Python
@@ -71,20 +68,20 @@ Amost all of the Olson timezones are supported.
sed -i '/^#!/d' ./pytz/tzfile.py
%build
-%python_build
+python setup.py build
%install
-%python_install
+python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Remove the pytz zoneinfo only if we use the system tz database
%if 0%{?suse_version} >= 1310
rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
%endif
-%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
+%fdupes %{buildroot}%{python_sitelib}
%check
-%python_expand nosetests-%{$python_bin_suffix}
+nosetests
-%files %{python_files}
+%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
%{python_sitelib}/*
From 82c4dd80ee2270de5a67995f2c9aabd97fd07cc1f10c67730c50d79696419522 Mon Sep 17 00:00:00 2001
From: Andreas Stieger
Date: Wed, 15 Mar 2017 21:41:50 +0000
Subject: [PATCH 12/14] add pytz-2016.10-fix-tests-with-2017a.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=55
---
python-pytz.changes | 3 +-
python-pytz.spec | 4 +-
pytz-2016.10-fix-tests-with-2017a.patch | 75 +++++++++++++++++++++++++
3 files changed, 80 insertions(+), 2 deletions(-)
create mode 100644 pytz-2016.10-fix-tests-with-2017a.patch
diff --git a/python-pytz.changes b/python-pytz.changes
index 57e279f..d597a6e 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,9 +1,10 @@
-------------------------------------------------------------------
-Thu Mar 2 16:39:42 UTC 2017 - astieger@suse.com
+Wed Mar 15 21:33:50 UTC 2017 - astieger@suse.com
- update to 2016.10:
* includes IANA 2016j
* No longer fails with timezone-2017a bsc#1027705
+ add pytz-2016.10-fix-tests-with-2017a.patch
-------------------------------------------------------------------
Mon Apr 25 08:10:27 UTC 2016 - astieger@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index 753ccd5..6a80dc1 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -30,12 +30,13 @@ Source90: pytz.keyring
Patch0: fix-tests.patch
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
Patch1: system_zoneinfo.patch
+Patch2: pytz-2016.10-fix-tests-with-2017a.patch
Requires: timezone
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-nose
# Tests will use this package
-BuildRequires: timezone
+BuildRequires: timezone >= 2017a
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
@@ -63,6 +64,7 @@ Amost all of the Olson timezones are supported.
%if 0%{?suse_version} >= 1310
# Use system tz database
%patch1 -p1
+%patch2 -p2
%endif
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./pytz/tzfile.py
diff --git a/pytz-2016.10-fix-tests-with-2017a.patch b/pytz-2016.10-fix-tests-with-2017a.patch
new file mode 100644
index 0000000..d31277d
--- /dev/null
+++ b/pytz-2016.10-fix-tests-with-2017a.patch
@@ -0,0 +1,75 @@
+From 838d7f06908c14352b0d4f3c5b656d0d95abaf9e Mon Sep 17 00:00:00 2001
+From: Andreas Stieger
+Date: Wed, 15 Mar 2017 22:23:14 +0100
+Subject: [PATCH] test fixes for 2017a numeric zone name changes
+References: boo#1027705 https://github.com/stub42/pytz/pull/1
+ https://github.com/stub42/pytz/pull/1/commits/838d7f06908c14352b0d4f3c5b656d0d95abaf9e
+
+---
+ src/pytz/tests/test_tzinfo.py | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/pytz/tests/test_tzinfo.py b/src/pytz/tests/test_tzinfo.py
+index 4d26d9ff..21812f6b 100644
+--- a/src/pytz/tests/test_tzinfo.py
++++ b/src/pytz/tests/test_tzinfo.py
+@@ -501,7 +501,7 @@ class NoumeaHistoryStartTestCase(USEasternDSTStartTestCase):
+ 'dst': timedelta(0),
+ }
+ after = {
+- 'tzname': 'NCT',
++ 'tzname': '+11',
+ 'utcoffset': timedelta(hours=11),
+ 'dst': timedelta(0),
+ }
+@@ -512,12 +512,12 @@ class NoumeaDSTEndTestCase(USEasternDSTStartTestCase):
+ tzinfo = pytz.timezone('Pacific/Noumea')
+ transition_time = datetime(1997, 3, 1, 15, 00, 00, tzinfo=UTC)
+ before = {
+- 'tzname': 'NCST',
++ 'tzname': '+12',
+ 'utcoffset': timedelta(hours=12),
+ 'dst': timedelta(hours=1),
+ }
+ after = {
+- 'tzname': 'NCT',
++ 'tzname': '+11',
+ 'utcoffset': timedelta(hours=11),
+ 'dst': timedelta(0),
+ }
+@@ -541,7 +541,7 @@ class TahitiTestCase(USEasternDSTStartTestCase):
+ 'dst': timedelta(0),
+ }
+ after = {
+- 'tzname': 'TAHT',
++ 'tzname': '-10',
+ 'utcoffset': timedelta(hours=-10),
+ 'dst': timedelta(0),
+ }
+@@ -554,12 +554,12 @@ class SamoaInternationalDateLineChange(USEasternDSTStartTestCase):
+ tzinfo = pytz.timezone('Pacific/Apia')
+ transition_time = datetime(2011, 12, 30, 10, 0, 0, tzinfo=UTC)
+ before = {
+- 'tzname': 'SDT',
++ 'tzname': '-10',
+ 'utcoffset': timedelta(hours=-10),
+ 'dst': timedelta(hours=1),
+ }
+ after = {
+- 'tzname': 'WSDT',
++ 'tzname': '+14',
+ 'utcoffset': timedelta(hours=14),
+ 'dst': timedelta(hours=1),
+ }
+@@ -611,7 +611,7 @@ class LocalTestCase(unittest.TestCase):
+ self.assertEqual(loc_time.strftime('%Z%z'), 'NST+0120')
+
+ loc_time = loc_tz.localize(datetime(1940, 5, 10, 0, 0, 0))
+- self.assertEqual(loc_time.strftime('%Z%z'), 'NET+0020')
++ self.assertEqual(loc_time.strftime('%Z%z'), '+0020+0020')
+
+ loc_time = loc_tz.localize(datetime(1940, 5, 20, 0, 0, 0))
+ self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200')
+--
+2.12.0
+
From 7710aff419dadc3a453fb27b6275efe753a5a920cc833e950d1c6ee820540f28 Mon Sep 17 00:00:00 2001
From: Andreas Stieger
Date: Fri, 17 Mar 2017 07:49:45 +0000
Subject: [PATCH 13/14] Accepting request 479855 from
devel:languages:python:singlespec
Implement single-spec version
OBS-URL: https://build.opensuse.org/request/show/479855
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=56
---
python-pytz.changes | 5 +++++
python-pytz.spec | 41 +++++++++++++++++++----------------------
2 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/python-pytz.changes b/python-pytz.changes
index d597a6e..b1c08d2 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Mar 16 02:58:11 UTC 2017 - toddrme2178@gmail.com
+
+- Implement single-spec version
+
-------------------------------------------------------------------
Wed Mar 15 21:33:50 UTC 2017 - astieger@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index 6a80dc1..1d81f64 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -16,6 +16,7 @@
#
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytz
Version: 2016.10
Release: 0
@@ -31,21 +32,19 @@ Patch0: fix-tests.patch
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
Patch1: system_zoneinfo.patch
Patch2: pytz-2016.10-fix-tests-with-2017a.patch
-Requires: timezone
BuildRequires: fdupes
-BuildRequires: python-devel
-BuildRequires: python-nose
-# Tests will use this package
-BuildRequires: timezone >= 2017a
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
-BuildArch: noarch
-%endif
-
+BuildRequires: python-rpm-macros
+BuildRequires: %{python_module devel}
+# Test requirements
+BuildRequires: %{python_module nose}
+BuildRequires: timezone
+Requires: timezone
Provides: python-tz = 2014b
Obsoletes: python-tz < 2014b
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildArch: noarch
+
+%python_subpackages
%description
pytz - World Timezone Definitions for Python
@@ -61,29 +60,27 @@ Amost all of the Olson timezones are supported.
%setup -q -n pytz-%{version}
# Disable test which is not working (and documented so)
%patch0 -p1
-%if 0%{?suse_version} >= 1310
# Use system tz database
%patch1 -p1
+# timezone 2017 a is currently only available in Leap 42.1
+%if 0%{?sle_version} == 120100 && 0%{?is_opensuse}
%patch2 -p2
%endif
+
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./pytz/tzfile.py
%build
-python setup.py build
+%python_build
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-# Remove the pytz zoneinfo only if we use the system tz database
-%if 0%{?suse_version} >= 1310
-rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
-%endif
-%fdupes %{buildroot}%{python_sitelib}
+%python_install
+%python_expand rm -fr %{buildroot}%{$python_sitelib}/pytz/zoneinfo
%check
-nosetests
+%python_expand nosetests-%{$python_bin_suffix}
-%files
+%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
%{python_sitelib}/*
From e101ac671c9dc5dbd4371be4626518fd2239c24707f85a28150a182bdef5ae3e Mon Sep 17 00:00:00 2001
From: Andreas Stieger
Date: Mon, 20 Mar 2017 23:26:51 +0000
Subject: [PATCH 14/14] Accepting request 481630 from home:dimstar:Factory
- Apply pytz-2016.10-fix-tests-with-2017a.patch for Tumbleweed
buildin.
OBS-URL: https://build.opensuse.org/request/show/481630
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=57
---
python-pytz.changes | 6 ++++++
python-pytz.spec | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/python-pytz.changes b/python-pytz.changes
index b1c08d2..6f87075 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Mon Mar 20 19:55:27 UTC 2017 - dimstar@opensuse.org
+
+- Apply pytz-2016.10-fix-tests-with-2017a.patch for Tumbleweed
+ buildin.
+
-------------------------------------------------------------------
Thu Mar 16 02:58:11 UTC 2017 - toddrme2178@gmail.com
diff --git a/python-pytz.spec b/python-pytz.spec
index 1d81f64..d5918b4 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -32,9 +32,9 @@ Patch0: fix-tests.patch
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
Patch1: system_zoneinfo.patch
Patch2: pytz-2016.10-fix-tests-with-2017a.patch
+BuildRequires: %{python_module devel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-BuildRequires: %{python_module devel}
# Test requirements
BuildRequires: %{python_module nose}
BuildRequires: timezone
@@ -62,8 +62,8 @@ Amost all of the Olson timezones are supported.
%patch0 -p1
# Use system tz database
%patch1 -p1
-# timezone 2017 a is currently only available in Leap 42.1
-%if 0%{?sle_version} == 120100 && 0%{?is_opensuse}
+# timezone 2017 a is currently only available in Leap 42.1 and Tumbleweed
+%if 0%{?sle_version} == 120100 && 0%{?is_opensuse} || 0%{?suse_version} > 1320
%patch2 -p2
%endif