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> 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. # because of cyclical dependencies between six and Sphinx.
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test" %if "%{flavor}" == "test"
%define test 1
%bcond_without test %bcond_without test
%define psuffix -test
%else %else
%bcond_with test %bcond_with test
%endif %define psuffix %{nil}
%if %{with test}
Name: python-six-%{flavor}
%else
Name: python-six
%endif %endif
Version: 1.12.0 Version: 1.12.0
Release: 0 Release: 0
@ -41,12 +37,13 @@ Source: https://files.pythonhosted.org/packages/source/s/six/six-%{versi
BuildRequires: %{python_module base} BuildRequires: %{python_module base}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildArch: noarch
Name: python-six%{psuffix}
%if %{with test} %if %{with test}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module py} BuildRequires: %{python_module py}
BuildRequires: python3-Sphinx BuildRequires: python3-Sphinx
%endif %endif
BuildArch: noarch
%python_subpackages %python_subpackages
%description %description
@ -57,9 +54,9 @@ both Python versions. See the documentation for more information on
what is provided. what is provided.
%package -n python-six-doc %package -n python-six-doc
Provides: %{python_module six-doc = %{version}} Summary: Documentation files for %{name}
Summary: Documentation files for %name
Group: Documentation/HTML Group: Documentation/HTML
Provides: %{python_module six-doc = %{version}}
%description -n python-six-doc %description -n python-six-doc
Six is a Python 2 and 3 compatibility library. It provides utility 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}. This package provides documentation for %{name}.
%prep %prep
%setup -q -n six-%{version} %setup -q -n six-%{version}
@ -91,7 +87,7 @@ cd documentation && make html && rm _build/html/.buildinfo
mkdir test mkdir test
cp test_six.py test cp test_six.py test
pushd test pushd test
%python_exec %{_bindir}/py.test test_six.py %pytest test_six.py
popd popd
rm -rf test rm -rf test
%endif %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 rm -rf %{python_sitelib}/six-*-py%{python_version}.egg-info
fi fi
%if !%{with test}
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc README.rst CHANGES %doc README.rst CHANGES
%if %{with test}
%doc documentation/_build/html
%else
%{python_sitelib}/six.py* %{python_sitelib}/six.py*
%pycache_only %{python3_sitelib}/__pycache__/* %pycache_only %{python3_sitelib}/__pycache__/*
%{python_sitelib}/six-%{version}-py*.egg-info %{python_sitelib}/six-%{version}-py*.egg-info
%else
%files -n python-six-doc
%license LICENSE
%doc documentation/_build/html
%endif %endif
%changelog %changelog