From cd50c7bd81a4d1f85608c5ca1c1bcf662d59ad657db671d30c6d922f0fdaa802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 11 Jun 2019 07:01:25 +0000 Subject: [PATCH] - Fix pytest call OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-six?expand=0&rev=67 --- python-six.changes | 6 ++++++ python-six.spec | 26 ++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/python-six.changes b/python-six.changes index b6fbd23..4c15efe 100644 --- a/python-six.changes +++ b/python-six.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 11 06:58:13 UTC 2019 - Tomáš Chvátal + +- Fix pytest call +- Fixdocumentation package generating + ------------------------------------------------------------------- Fri Jan 25 19:43:33 UTC 2019 - Neal Gompa diff --git a/python-six.spec b/python-six.spec index b1ebb18..9ad9054 100644 --- a/python-six.spec +++ b/python-six.spec @@ -21,15 +21,11 @@ # because of cyclical dependencies between six and Sphinx. %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" -%define test 1 %bcond_without test +%define psuffix -test %else %bcond_with test -%endif -%if %{with test} -Name: python-six-%{flavor} -%else -Name: python-six +%define psuffix %{nil} %endif Version: 1.12.0 Release: 0 @@ -41,12 +37,13 @@ Source: https://files.pythonhosted.org/packages/source/s/six/six-%{versi BuildRequires: %{python_module base} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildArch: noarch +Name: python-six%{psuffix} %if %{with test} BuildRequires: %{python_module pytest} BuildRequires: %{python_module py} BuildRequires: python3-Sphinx %endif -BuildArch: noarch %python_subpackages %description @@ -57,9 +54,9 @@ both Python versions. See the documentation for more information on what is provided. %package -n python-six-doc -Provides: %{python_module six-doc = %{version}} -Summary: Documentation files for %name +Summary: Documentation files for %{name} Group: Documentation/HTML +Provides: %{python_module six-doc = %{version}} %description -n python-six-doc Six is a Python 2 and 3 compatibility library. It provides utility @@ -69,7 +66,6 @@ both Python versions. This package provides documentation for %{name}. - %prep %setup -q -n six-%{version} @@ -91,7 +87,7 @@ cd documentation && make html && rm _build/html/.buildinfo mkdir test cp test_six.py test pushd test -%python_exec %{_bindir}/py.test test_six.py +%pytest test_six.py popd rm -rf test %endif @@ -103,15 +99,17 @@ if [ -d %{python_sitelib}/six-*-py%{python_version}.egg-info ]; then rm -rf %{python_sitelib}/six-*-py%{python_version}.egg-info fi +%if !%{with test} %files %{python_files} %license LICENSE %doc README.rst CHANGES -%if %{with test} -%doc documentation/_build/html -%else %{python_sitelib}/six.py* %pycache_only %{python3_sitelib}/__pycache__/* %{python_sitelib}/six-%{version}-py*.egg-info +%else +%files -n python-six-doc +%license LICENSE +%doc documentation/_build/html %endif %changelog