From 2ea0e6229a7d0388c5eb6205727a63c27fba5e4ce2833668d9d374cd9a2817f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 26 Apr 2018 14:59:15 +0000 Subject: [PATCH] Accepting request 601621 from home:badshah400:branches:devel:languages:python - Add python-curtsies-dont-require-typing-for-python3.5.patch: The typing module is only required for python3.4 and lower; patch taken from upstream git (gh#bpython/curtsies#111). OBS-URL: https://build.opensuse.org/request/show/601621 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-curtsies?expand=0&rev=7 --- ...es-dont-require-typing-for-python3.5.patch | 23 +++++++++++++++++++ python-curtsies.changes | 7 ++++++ python-curtsies.spec | 16 ++++++------- 3 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 python-curtsies-dont-require-typing-for-python3.5.patch diff --git a/python-curtsies-dont-require-typing-for-python3.5.patch b/python-curtsies-dont-require-typing-for-python3.5.patch new file mode 100644 index 0000000..157276a --- /dev/null +++ b/python-curtsies-dont-require-typing-for-python3.5.patch @@ -0,0 +1,23 @@ +From 217b4f83e954837f8adc4c549c1f2f9f2bb272a7 Mon Sep 17 00:00:00 2001 +From: Po-Chuan Hsieh +Date: Wed, 14 Feb 2018 21:28:38 +0800 +Subject: [PATCH] Fix install_requires + +typing is only required for Python 3.4 or below. +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index b35c7c3..6e52cbd 100644 +--- a/setup.py ++++ b/setup.py +@@ -41,7 +41,7 @@ def get_long_description(): + install_requires = [ + 'blessings>=1.5', + 'wcwidth>=0.1.4', +- 'typing', ++ 'typing; python_version<"3.5"', + ], + tests_require = [ + 'mock', diff --git a/python-curtsies.changes b/python-curtsies.changes index f28c12f..1fa1348 100644 --- a/python-curtsies.changes +++ b/python-curtsies.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 26 14:30:25 UTC 2018 - badshah400@opensuse.org + +- Add python-curtsies-dont-require-typing-for-python3.5.patch: The + typing module is only required for python3.4 and lower; patch + taken from upstream git (gh#bpython/curtsies#111). + ------------------------------------------------------------------- Tue Feb 20 19:32:54 UTC 2018 - arun@gmx.de diff --git a/python-curtsies.spec b/python-curtsies.spec index 2805c08..d7b69c9 100644 --- a/python-curtsies.spec +++ b/python-curtsies.spec @@ -23,8 +23,10 @@ Release: 0 Summary: Curses-like terminal wrapper, with colored strings! License: MIT Group: Development/Languages/Python -Url: https://github.com/bpython/curtsies +URL: https://github.com/bpython/curtsies Source: https://files.pythonhosted.org/packages/source/c/curtsies/curtsies-%{version}.tar.gz +# PATCH-FIX-UPSTREAM python-curtsies-dont-require-typing-for-python3.5.patch gh#bpython/curtsies#111 badshah400@opensuse.org -- The typing module is only required for python3.4 and lower; patch taken from upstream git. +Patch0: python-curtsies-dont-require-typing-for-python3.5.patch BuildRequires: %{python_module blessings} BuildRequires: %{python_module devel} BuildRequires: %{python_module mock} @@ -34,12 +36,12 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python2-typing +Requires: python-blessings +BuildArch: noarch # do not require python3-typing for python >= 3.5 %if 0%{?suse_version} <= 1320 BuildRequires: python3-typing %endif - -Requires: python-blessings %ifpython2 Requires: python-typing %endif @@ -48,9 +50,6 @@ Requires: python-typing Requires: python-typing %endif %endif - -BuildArch: noarch - %python_subpackages %description @@ -59,6 +58,7 @@ arrays of text. %prep %setup -q -n curtsies-%{version} +%patch0 -p1 %build %python_build @@ -71,8 +71,8 @@ arrays of text. %python_expand nosetests-%{$python_bin_suffix} %files %{python_files} -%defattr(-,root,root,-) -%doc readme.md LICENSE +%license LICENSE +%doc readme.md %{python_sitelib}/* %changelog