diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..6222fa7 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + test + wheel + diff --git a/python-sphinx-autodoc-typehints.changes b/python-sphinx-autodoc-typehints.changes index 16a435e..de17502 100644 --- a/python-sphinx-autodoc-typehints.changes +++ b/python-sphinx-autodoc-typehints.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 11 10:08:38 UTC 2022 - Matej Cepl + +- Switch to multibuild to break build cycles. + ------------------------------------------------------------------- Thu May 5 05:35:05 UTC 2022 - Matej Cepl diff --git a/python-sphinx-autodoc-typehints.spec b/python-sphinx-autodoc-typehints.spec index 1065af1..4543240 100644 --- a/python-sphinx-autodoc-typehints.spec +++ b/python-sphinx-autodoc-typehints.spec @@ -1,5 +1,5 @@ # -# spec file for package python-sphinx-autodoc-typehints +# spec file # # Copyright (c) 2022 SUSE LLC # @@ -19,8 +19,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %define modname sphinx_autodoc_typehints - -Name: python-sphinx-autodoc-typehints +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-sphinx-autodoc-typehints%{psuffix} Version: 1.18.1 Release: 0 Summary: Type hints (PEP 484) support for the Sphinx autodoc extension @@ -36,8 +43,8 @@ BuildRequires: %{python_module setuptools_scm >= 1.7.0} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Sphinx >= 1.7 -Requires: python-typing_extensions BuildArch: noarch +%if %{with test} # SECTION tests BuildRequires: %{python_module Sphinx >= 1.7} BuildRequires: %{python_module doc} @@ -46,6 +53,7 @@ BuildRequires: %{python_module pathlib} BuildRequires: %{python_module pytest} BuildRequires: %{python_module sphobjinv} BuildRequires: %{python_module typing_extensions} +%endif # /SECTION %python_subpackages @@ -61,18 +69,25 @@ and return value types of functions. %python_expand sed -i -e 's/@PYTHON_VERSION@/%{$python_version}/' tests/conftest.py %install +%if %{without test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +export PYTHONPATH=./src +%if %{with test} # test_sphinx_output -- too depenedent on sphinx version available # gh#tox-dev/sphinx-autodoc-typehints#229 %pytest -k 'not (test_sphinx_output or test_format_annotation)' +%endif +%if %{without test} %files %{python_files} %license LICENSE %doc README.md CHANGELOG.md %{python_sitelib}/%{modname}-%{version}*-info %{python_sitelib}/%{modname} +%endif %changelog