From 8ce87fd154a974b0e7b30f0912fdb6c5ca410199b54e959feafc413d65947f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 3 Jul 2019 09:11:11 +0000 Subject: [PATCH] - Fix the test run with new pytest OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mccabe?expand=0&rev=18 --- python-mccabe.changes | 5 +++++ python-mccabe.spec | 21 ++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/python-mccabe.changes b/python-mccabe.changes index 0cb0694..e9ac51c 100644 --- a/python-mccabe.changes +++ b/python-mccabe.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 3 09:10:58 UTC 2019 - Tomáš Chvátal + +- Fix the test run with new pytest + ------------------------------------------------------------------- Mon Mar 6 14:03:34 UTC 2017 - jmatejek@suse.com diff --git a/python-mccabe.spec b/python-mccabe.spec index fa52193..0ad652c 100644 --- a/python-mccabe.spec +++ b/python-mccabe.spec @@ -1,7 +1,7 @@ # # spec file for package python-mccabe # -# Copyright (c) 2017 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 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -23,12 +23,12 @@ Release: 0 Summary: McCabe checker, plugin for flake8 License: MIT Group: Development/Languages/Python -Url: https://github.com/flintwork/mccabe -Source: https://pypi.io/packages/source/m/mccabe/mccabe-%{version}.tar.gz -BuildRequires: %{python_module pytest-runner} +URL: https://github.com/flintwork/mccabe +Source: https://files.pythonhosted.org/packages/source/m/mccabe/mccabe-%{version}.tar.gz +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %python_subpackages @@ -38,19 +38,22 @@ This module provides a plugin for flake8, the Python code checker. %prep %setup -q -n mccabe-%{version} +# do not require pytest-runner for setup +sed -i 's:pytest-runner::' setup.py %build %python_build %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec %{_bindir}/py.test +%pytest %files %{python_files} -%defattr(-,root,root,-) -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{python_sitelib}/* %changelog