Accepting request 709049 from devel:languages:python

- Fix pytest call
- Fixdocumentation package generating

OBS-URL: https://build.opensuse.org/request/show/709049
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-six?expand=0&rev=32
This commit is contained in:
Dominique Leuenberger 2019-06-18 12:49:05 +00:00 committed by Git OBS Bridge
commit 8c0e9555c4
2 changed files with 18 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 11 06:58:13 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Fix pytest call
- Fixdocumentation package generating
-------------------------------------------------------------------
Fri Jan 25 19:43:33 UTC 2019 - Neal Gompa <ngompa13@gmail.com>

View File

@ -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