Accepting request 862673 from home:bnavigator:branches:devel:languages:python

- Test in separate multibuild flavor to break depcycles with full
  python stdlib

OBS-URL: https://build.opensuse.org/request/show/862673
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=27
This commit is contained in:
Markéta Machová 2021-01-12 16:26:42 +00:00 committed by Git OBS Bridge
parent 341fffb615
commit 58d52be588
3 changed files with 27 additions and 4 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jan 12 16:06:44 UTC 2021 - Benjamin Greiner <code@bnavigator.de>
- Test in separate multibuild flavor to break depcycles with full
python stdlib
-------------------------------------------------------------------
Tue Jan 12 14:44:39 UTC 2021 - Benjamin Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-typing_extensions
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,7 +19,15 @@
%define modname typing_extensions
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-typing_extensions
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-typing_extensions%{psuffix}
Version: 3.7.4.3
Release: 0
Summary: Backported and Experimental Type Hints for Python 35+
@ -31,7 +39,7 @@ BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
Provides: python-typing-extensions = %{version}
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 && %{with test}
BuildRequires: %{python_module testsuite}
%endif
%if %{with python2}
@ -66,21 +74,27 @@ Python versions or requires experimental types.
%build
%python_build
%if ! %{with test}
%install
%python_install
%fdupes %{buildroot}%{python3_sitelib}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
# X.Y -> X
%{python_expand current_bin_suffix=%{$python_bin_suffix}
$python src_py${current_bin_suffix:0:1}/test_typing_extensions.py
}
%endif
%if ! %{with test}
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/typing_extensions.py*
%pycache_only %{python_sitelib}/__pycache__/typing_extensions*
%{python_sitelib}/typing_extensions-%{version}*-info
%endif
%changelog