14
0

- Add patch to fix build with new freezegun (by skipping test):

* freezegun-skip.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cached-property?expand=0&rev=10
This commit is contained in:
Tomáš Chvátal
2019-02-01 10:59:14 +00:00
committed by Git OBS Bridge
parent 73e8779ad8
commit 95e8ce8514
3 changed files with 25 additions and 8 deletions

12
freezegun-skip.patch Normal file
View File

@@ -0,0 +1,12 @@
Index: cached-property-1.3.0/tests/test_cached_property.py
===================================================================
--- cached-property-1.3.0.orig/tests/test_cached_property.py
+++ cached-property-1.3.0/tests/test_cached_property.py
@@ -191,6 +191,7 @@ class TestCachedPropertyWithTTL(TestCach
self.assert_cached(check, 2)
self.assert_cached(check, 2)
+ @unittest.skip("new freezegun breaks behaviour of this test")
def test_threads_ttl_expiry(self):
Check = CheckFactory(self.cached_property_factory(ttl=100000),
threadsafe=True)

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 1 10:58:51 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to fix build with new freezegun (by skipping test):
* freezegun-skip.patch
-------------------------------------------------------------------
Tue Dec 4 12:46:23 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cached-property
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 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
@@ -17,7 +17,6 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-cached-property
Version: 1.3.0
Release: 0
@@ -26,13 +25,14 @@ License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/pydanny/cached-property
Source: https://files.pythonhosted.org/packages/source/c/cached-property/cached-property-%{version}.tar.gz
# PATCH-FIX-UPSTREAM skip test that rely on wrong freezegun behaviour
# https://github.com/pydanny/cached-property/pull/125
Patch0: freezegun-skip.patch
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module freezegun}
%endif
%python_subpackages
%description
@@ -42,6 +42,7 @@ and 3.
%prep
%setup -q -n cached-property-%{version}
%patch0 -p1
%build
%python_build
@@ -50,10 +51,8 @@ and 3.
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
%python_expand $python -m unittest discover -v
%files %{python_files}
%license LICENSE