From b11b600f06448f4079fc4e4f6df83541edcb27c8041b9dd3bb358ee2aa98704c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 8 Jun 2020 07:19:59 +0000 Subject: [PATCH] - Add missing python2 dependency for Leap to work OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wcwidth?expand=0&rev=24 --- python-wcwidth.changes | 5 +++++ python-wcwidth.spec | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/python-wcwidth.changes b/python-wcwidth.changes index cf53ee7..7d8dee3 100644 --- a/python-wcwidth.changes +++ b/python-wcwidth.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 8 07:13:36 UTC 2020 - Tomáš Chvátal + +- Add missing python2 dependency for Leap to work + ------------------------------------------------------------------- Tue Jun 2 06:52:39 UTC 2020 - Marketa Calabkova diff --git a/python-wcwidth.spec b/python-wcwidth.spec index 765f9d4..5f494a1 100644 --- a/python-wcwidth.spec +++ b/python-wcwidth.spec @@ -19,27 +19,34 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" -%bcond_without test %define psuffix -%{flavor} +%bcond_without test %else -%bcond_with test %define psuffix %{nil} +%bcond_with test %endif +%bcond_without python2 Name: python-wcwidth%{psuffix} Version: 0.2.2 Release: 0 Summary: Number of Terminal column cells of wide-character codes License: MIT -Group: Development/Languages/Python URL: https://github.com/jquast/wcwidth Source: https://github.com/jquast/wcwidth/archive/%{version}.tar.gz#/wcwidth-%{version}.tar.gz -%if %{with test} -BuildRequires: %{python_module pytest} -%endif BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module wcwidth >= %{version}} +%if %{with python2} +BuildRequires: python-backports.functools_lru_cache >= 1.2.1 +%endif +%endif +%ifpython2 +Requires: python-backports.functools_lru_cache >= 1.2.1 +%endif %python_subpackages %description @@ -74,7 +81,6 @@ sed -i 's/--cov[-=a-z]*//g' tox.ini %endif %if ! %{with test} - %files %{python_files} %license LICENSE %doc README.rst