From e9319776fa00837ae69b0b73a59fe3bd9b7118fd25fdb682b37aeb0bd475de96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Mar 2020 10:34:57 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fasteners?expand=0&rev=18 --- python-fasteners.changes | 5 +++++ python-fasteners.spec | 21 +++++++-------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/python-fasteners.changes b/python-fasteners.changes index b6bd5c8..2bed102 100644 --- a/python-fasteners.changes +++ b/python-fasteners.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 16 10:34:29 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Fri Dec 20 19:17:02 UTC 2019 - Dirk Mueller diff --git a/python-fasteners.spec b/python-fasteners.spec index 7d0968c..abc247c 100644 --- a/python-fasteners.spec +++ b/python-fasteners.spec @@ -1,7 +1,7 @@ # # spec file for package python-fasteners # -# 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,25 +17,24 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without tests +%bcond_without python2 Name: python-fasteners Version: 0.14.1 Release: 0 Summary: A python package that provides useful locks License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/harlowja/fasteners Source: https://files.pythonhosted.org/packages/source/f/fasteners/fasteners-%{version}.tar.gz +BuildRequires: %{python_module monotonic >= 0.1} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module testtools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-monotonic >= 0.1 Requires: python-six BuildArch: noarch -%if %{with tests} -BuildRequires: %{python_module monotonic >= 0.1} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module testtools} +%if %{with python2} BuildRequires: python-futures %endif %python_subpackages @@ -58,14 +57,8 @@ It includes the following. %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with tests} %check -pushd fasteners/tests -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} -py.test-%{$python_bin_suffix} ./ -} -popd -%endif +%pytest %files %{python_files} %license LICENSE