From b25d132839ef8b775cc3042265c7eb5355c9bebb9e75a568eb3de8badae45ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 2 Jun 2020 16:34:39 +0000 Subject: [PATCH] Accepting request 810870 from home:pgajdos:python - drop dependency on unittest2 for python3 - added patches https://github.com/fonttools/pyclipper/pull/32 + python-pyclipper-no-unittest2.patch OBS-URL: https://build.opensuse.org/request/show/810870 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyclipper?expand=0&rev=4 --- python-pyclipper-no-unittest2.patch | 16 ++++++++++++++++ python-pyclipper.changes | 8 ++++++++ python-pyclipper.spec | 8 +++++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 python-pyclipper-no-unittest2.patch diff --git a/python-pyclipper-no-unittest2.patch b/python-pyclipper-no-unittest2.patch new file mode 100644 index 0000000..3007954 --- /dev/null +++ b/python-pyclipper-no-unittest2.patch @@ -0,0 +1,16 @@ +Index: pyclipper-1.1.0.post3/tests/test_pyclipper.py +=================================================================== +--- pyclipper-1.1.0.post3.orig/tests/test_pyclipper.py 2019-11-29 17:53:00.000000000 +0100 ++++ pyclipper-1.1.0.post3/tests/test_pyclipper.py 2020-06-02 16:53:28.959317899 +0200 +@@ -4,7 +4,10 @@ Tests for Pyclipper wrapper library. + """ + + from __future__ import print_function +-from unittest2 import TestCase, main ++try: ++ from unittest2 import TestCase, main ++except ImportError: ++ from unittest import TestCase, main + import sys + + if sys.version_info < (3,): diff --git a/python-pyclipper.changes b/python-pyclipper.changes index 9cbf0e5..7ae18ba 100644 --- a/python-pyclipper.changes +++ b/python-pyclipper.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jun 2 15:03:59 UTC 2020 - pgajdos@suse.com + +- drop dependency on unittest2 for python3 +- added patches + https://github.com/fonttools/pyclipper/pull/32 + + python-pyclipper-no-unittest2.patch + ------------------------------------------------------------------- Fri Mar 6 02:17:18 UTC 2020 - Xu Zhao diff --git a/python-pyclipper.spec b/python-pyclipper.spec index 81eadb3..854b668 100644 --- a/python-pyclipper.spec +++ b/python-pyclipper.spec @@ -18,6 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-pyclipper Version: 1.1.0.post3 Release: 0 @@ -25,12 +26,16 @@ Summary: Cython wrapper for the Clipper library License: MIT URL: https://github.com/fonttools/pyclipper Source: https://files.pythonhosted.org/packages/source/p/pyclipper/pyclipper-%{version}.zip +# https://github.com/fonttools/pyclipper/pull/32 +Patch0: python-pyclipper-no-unittest2.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module unittest2} +%if %{with python2} +BuildRequires: python2-unittest2 +%endif BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: python-rpm-macros @@ -44,6 +49,7 @@ the C++ translation of the `Angus Johnson's Clipper library (ver. %prep %setup -q -n pyclipper-%{version} +%patch0 -p1 %build %python_build