14
0
forked from pool/python-tblib

Accepting request 681078 from home:jayvdb:noflake8

- Remove bcond_with test preventing the tests from running,
  and fix the %check
- Remove unnecessary dependency on tox, flake8 and 9 other deps
- Add 0001-Patch-tests-against-Python-3.7.patch to workaround
  Python 3.7 test failure.

OBS-URL: https://build.opensuse.org/request/show/681078
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tblib?expand=0&rev=6
This commit is contained in:
Tomáš Chvátal
2019-03-03 12:33:04 +00:00
committed by Git OBS Bridge
parent 189f152bae
commit 6022fcd26c
3 changed files with 51 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-tblib
#
# 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
@@ -16,9 +16,6 @@
#
# Tests require network connection
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-tblib
Version: 1.3.2
@@ -28,24 +25,13 @@ License: BSD-2-Clause
Group: Development/Languages/Python
Url: https://github.com/ionelmc/python-tblib
Source: https://files.pythonhosted.org/packages/source/t/tblib/tblib-%{version}.tar.gz
# https://github.com/ionelmc/python-tblib/issues/36
Patch0: https://src.fedoraproject.org/rpms/python-tblib/raw/master/f/0001-Patch-tests-against-Python-3.7.patch
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module check-manifest}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module flake8}
BuildRequires: %{python_module isort}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-travis-fold}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module readme_renderer}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module sphinx_py3doc_enhanced_theme}
BuildRequires: python3-tox
%endif
Requires: python-six
BuildArch: noarch
@@ -72,6 +58,7 @@ the pickle support.
%prep
%setup -q -n tblib-%{version}
%patch0 -p1
%build
%python_build
@@ -80,13 +67,12 @@ the pickle support.
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_expand py.test-%{$python_bin_suffix}
%endif
%{python_expand export PYTHONPATH=tests:%{buildroot}%{$python_sitelib}
$python -m pytest README.rst
}
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS.rst CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/*