From ec149c0e3a8a9fd7464dc5684811753da0da3545a4d5ec94280983d1dd316a87 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 11 Mar 2020 09:04:04 +0000 Subject: [PATCH 1/2] - update to 0.3.15: * Fix locale timestamp bug. CC #328 * Fix calendar.timegm behavior * Fix for Py3.8 * Reset time.time_ns on stop - drop remove_dependency_on_mock.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-freezegun?expand=0&rev=29 --- denose.patch | 17 ++++++++++------- freezegun-0.3.12.tar.gz | 3 --- freezegun-0.3.15.tar.gz | 3 +++ python-freezegun.changes | 11 +++++++++++ python-freezegun.spec | 6 ++---- remove_dependency_on_mock.patch | 27 --------------------------- 6 files changed, 26 insertions(+), 41 deletions(-) delete mode 100644 freezegun-0.3.12.tar.gz create mode 100644 freezegun-0.3.15.tar.gz delete mode 100644 remove_dependency_on_mock.patch diff --git a/denose.patch b/denose.patch index 9a96b62..5aa225e 100644 --- a/denose.patch +++ b/denose.patch @@ -1,11 +1,14 @@ ---- a/setup.py -+++ b/setup.py -@@ -4,7 +4,7 @@ import sys - from setuptools import setup +Index: freezegun-0.3.15/setup.py +=================================================================== +--- freezegun-0.3.15.orig/setup.py ++++ freezegun-0.3.15/setup.py +@@ -5,8 +5,7 @@ from setuptools import setup requires = ['six'] --tests_require = ['mock', 'nose'] -+tests_require = ['mock'] + tests_require = [ +- 'mock;python_version<"3.4"', +- 'nose' ++ 'mock;python_version<"3.4"' + ] if sys.version_info.major == 2: - requires += ['python-dateutil>=1.0, != 2.0'] diff --git a/freezegun-0.3.12.tar.gz b/freezegun-0.3.12.tar.gz deleted file mode 100644 index b621ff4..0000000 --- a/freezegun-0.3.12.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a4d9c8cd3c04a201e20c313caf8b6338f1cfa4cda43f46a94cc4a9fd13ea5e7 -size 24346 diff --git a/freezegun-0.3.15.tar.gz b/freezegun-0.3.15.tar.gz new file mode 100644 index 0000000..a59a05f --- /dev/null +++ b/freezegun-0.3.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2062f2c7f95cc276a834c22f1a17179467176b624cc6f936e8bc3be5535ad1b +size 25530 diff --git a/python-freezegun.changes b/python-freezegun.changes index 2ff7999..f0e9d7b 100644 --- a/python-freezegun.changes +++ b/python-freezegun.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 11 08:59:55 UTC 2020 - Dirk Mueller + +- update to 0.3.15: + * Fix locale timestamp bug. CC #328 + * Fix calendar.timegm behavior + * Fix for Py3.8 + * Reset time.time_ns on stop + +- drop remove_dependency_on_mock.patch + ------------------------------------------------------------------- Thu Nov 14 19:05:26 CET 2019 - Matej Cepl diff --git a/python-freezegun.spec b/python-freezegun.spec index ce0ae45..db7106a 100644 --- a/python-freezegun.spec +++ b/python-freezegun.spec @@ -1,7 +1,7 @@ # # spec file for package python-freezegun # -# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-freezegun -Version: 0.3.12 +Version: 0.3.15 Release: 0 Summary: Mock time date for Python License: Apache-2.0 @@ -26,8 +26,6 @@ Group: Development/Languages/Python URL: https://github.com/spulec/freezegun Source: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz # gh#spulec/freezegun#259 -Patch0: remove_dependency_on_mock.patch -# gh#spulec/freezegun#280 Removal of nose dependency Patch1: denose.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil > 2.0} diff --git a/remove_dependency_on_mock.patch b/remove_dependency_on_mock.patch deleted file mode 100644 index 0979588..0000000 --- a/remove_dependency_on_mock.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/tests/test_ticking.py -+++ b/tests/test_ticking.py -@@ -1,7 +1,10 @@ - import datetime - import time --import mock - import pytest -+try: -+ import mock -+except ImportError: -+ import unittest.mock as mock - - from freezegun import freeze_time - from tests import utils ---- a/tests/test_utils.py -+++ b/tests/test_utils.py -@@ -1,6 +1,9 @@ - from unittest import SkipTest - --import mock -+try: -+ import mock -+except ImportError: -+ import unittest.mock as mock - - from freezegun import api - from tests import utils From 574f8da21986658633eec55ea83089ce5d67f7ceed370e38621f0a98d0a8e0f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 11 Mar 2020 17:30:07 +0000 Subject: [PATCH 2/2] - Fix build without python2 available OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-freezegun?expand=0&rev=30 --- python-freezegun.changes | 5 +++++ python-freezegun.spec | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/python-freezegun.changes b/python-freezegun.changes index f0e9d7b..c408d97 100644 --- a/python-freezegun.changes +++ b/python-freezegun.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 11 17:29:52 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 available + ------------------------------------------------------------------- Wed Mar 11 08:59:55 UTC 2020 - Dirk Mueller diff --git a/python-freezegun.spec b/python-freezegun.spec index db7106a..8975051 100644 --- a/python-freezegun.spec +++ b/python-freezegun.spec @@ -17,12 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-freezegun Version: 0.3.15 Release: 0 Summary: Mock time date for Python License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/spulec/freezegun Source: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz # gh#spulec/freezegun#259 @@ -32,15 +32,15 @@ BuildRequires: %{python_module python-dateutil > 2.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: %{pythons} -%ifpython2 -BuildRequires: python-mock -%endif BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python Requires: python-python-dateutil > 2.0 Requires: python-six BuildArch: noarch +%if %{with python2} +BuildRequires: python-mock +%endif %python_subpackages %description