From 341fffb615c2ec1555b43fa0a495014cf1218accf5be2e7632b94cbf796dd0a7 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 12 Jan 2021 15:23:06 +0000 Subject: [PATCH 1/2] Accepting request 862662 from home:bnavigator:branches:devel:languages:python - clean requirements specifications for python flavors OBS-URL: https://build.opensuse.org/request/show/862662 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=26 --- python-typing_extensions.changes | 5 +++++ python-typing_extensions.spec | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index e53f4c3..ddff877 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 12 14:44:39 UTC 2021 - Benjamin Greiner + +- clean requirements specifications for python flavors + ------------------------------------------------------------------- Sun Dec 20 09:11:23 UTC 2020 - Dirk Müller diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index a04d36a..fe565c5 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -31,19 +31,14 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch Provides: python-typing-extensions = %{version} -%if %{with python2} -BuildRequires: python-typing >= 3.7.4 -%endif -%if 0%{?suse_version} < 1500 -BuildRequires: python3-typing >= 3.7.4 -%endif %if 0%{?suse_version} > 1320 BuildRequires: %{python_module testsuite} %endif -%if %{python3_version_nodots} < 35 -Requires: python-typing >= 3.7.4 +%if %{with python2} +BuildRequires: python-typing >= 3.7.4 %endif -%ifpython2 +BuildRequires: (python3-typing >= 3.7.4 if python3-base < 3.5) +%if %{python_version_nodots} < 35 Requires: python-typing >= 3.7.4 %endif %python_subpackages @@ -84,6 +79,8 @@ $python src_py${current_bin_suffix:0:1}/test_typing_extensions.py %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/typing_extensions.py* +%pycache_only %{python_sitelib}/__pycache__/typing_extensions* +%{python_sitelib}/typing_extensions-%{version}*-info %changelog From 58d52be588e82a258073b99a653e748e523a8a42df74fec706fba6cb453ea9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 12 Jan 2021 16:26:42 +0000 Subject: [PATCH 2/2] 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 --- _multibuild | 3 +++ python-typing_extensions.changes | 6 ++++++ python-typing_extensions.spec | 22 ++++++++++++++++++---- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index ddff877..3d95d3f 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 12 16:06:44 UTC 2021 - Benjamin Greiner + +- Test in separate multibuild flavor to break depcycles with full + python stdlib + ------------------------------------------------------------------- Tue Jan 12 14:44:39 UTC 2021 - Benjamin Greiner diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index fe565c5..7915023 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -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