Accepting request 783995 from devel:languages:python
- Fix build without python2 available - 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/request/show/783995 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-freezegun?expand=0&rev=9
This commit is contained in:
commit
e4c372ec48
17
denose.patch
17
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']
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a4d9c8cd3c04a201e20c313caf8b6338f1cfa4cda43f46a94cc4a9fd13ea5e7
|
||||
size 24346
|
3
freezegun-0.3.15.tar.gz
Normal file
3
freezegun-0.3.15.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e2062f2c7f95cc276a834c22f1a17179467176b624cc6f936e8bc3be5535ad1b
|
||||
size 25530
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 11 17:29:52 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Fix build without python2 available
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 11 08:59:55 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- 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 <mcepl@suse.com>
|
||||
|
||||
|
@ -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
|
||||
@ -17,32 +17,30 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without python2
|
||||
Name: python-freezegun
|
||||
Version: 0.3.12
|
||||
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
|
||||
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}
|
||||
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
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user