From 20fb644dee0f563154820a557c52e6139ed5ad04a0a81528ed6d6ea0acca0c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 12 Mar 2020 07:52:18 +0000 Subject: [PATCH] - Fix build without python2 available OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typing_extensions?expand=0&rev=16 --- python-typing_extensions.changes | 5 +++++ python-typing_extensions.spec | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/python-typing_extensions.changes b/python-typing_extensions.changes index d1a18f9..3398f5d 100644 --- a/python-typing_extensions.changes +++ b/python-typing_extensions.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 12 07:52:02 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 available + ------------------------------------------------------------------- Wed Nov 6 17:15:46 UTC 2019 - Lars Vogdt diff --git a/python-typing_extensions.spec b/python-typing_extensions.spec index 491eeed..d8f278b 100644 --- a/python-typing_extensions.spec +++ b/python-typing_extensions.spec @@ -1,7 +1,7 @@ # # spec file for package python-typing_extensions # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,32 +18,33 @@ %define modname typing_extensions %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-typing_extensions Version: 3.7.4.1 Release: 0 Summary: Backported and Experimental Type Hints for Python 35+ License: Python-2.0 -Group: Development/Languages/Python URL: https://github.com/python/typing/ Source0: https://files.pythonhosted.org/packages/source/t/typing_extensions/%{modname}-%{version}.tar.gz BuildRequires: %{python_module setuptools} -%if %{python3_version_nodots} < 35 +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%if %{with python2} +BuildRequires: python-typing >= 3.7.4 +%endif +%if 0%{?suse_version} < 1500 BuildRequires: python3-typing >= 3.7.4 %endif -BuildRequires: python2-typing >= 3.7.4 %if 0%{?suse_version} > 1320 BuildRequires: python3-testsuite %endif -BuildRequires: fdupes -BuildRequires: python-rpm-macros %if %{python3_version_nodots} < 35 -Requires: python3-typing >= 3.7.4 +Requires: python-typing >= 3.7.4 %endif %ifpython2 -Requires: python2-typing >= 3.7.4 +Requires: python-typing >= 3.7.4 %endif -BuildArch: noarch - %python_subpackages %description