diff --git a/python-astor.changes b/python-astor.changes index 628d8f0..426e1d6 100644 --- a/python-astor.changes +++ b/python-astor.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 1 09:54:30 UTC 2020 - Tomáš Chvátal + +- Remove patch remove_unittest2.patch as we use pytest to load + stuff it is no longer really needed + ------------------------------------------------------------------- Fri May 29 12:49:31 UTC 2020 - pgajdos@suse.com diff --git a/python-astor.spec b/python-astor.spec index c707a7b..d715332 100644 --- a/python-astor.spec +++ b/python-astor.spec @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-astor Version: 0.8.1 Release: 0 @@ -27,8 +28,6 @@ URL: https://github.com/berkerpeksag/astor Source: https://github.com/berkerpeksag/astor/archive/%{version}.tar.gz#/astor-%{version}.tar.gz # https://github.com/berkerpeksag/astor/pull/177 Patch0: remove_nose.patch -# https://github.com/berkerpeksag/astor/issues/90 -Patch1: remove_unittest2.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -36,7 +35,7 @@ BuildRequires: python-rpm-macros BuildArch: noarch # SECTION test requirements %if %{with python2} -BuildRequires: %{python_module unittest2} +BuildRequires: python-unittest2 %endif # /SECTION %python_subpackages @@ -68,9 +67,6 @@ There are some other similar libraries, but astor focuses on the following areas %prep %setup -q -n astor-%{version} %patch0 -p1 -%if 0%{?suse_version} <= 1500 -%patch1 -p1 -%endif %build # ugly fix for the use of /usr/bin/env diff --git a/remove_unittest2.patch b/remove_unittest2.patch deleted file mode 100644 index 3b1d403..0000000 --- a/remove_unittest2.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: astor-0.8.1/tests/test_misc.py -=================================================================== ---- astor-0.8.1.orig/tests/test_misc.py 2019-12-10 02:48:43.000000000 +0100 -+++ astor-0.8.1/tests/test_misc.py 2020-05-29 14:40:33.063783987 +0200 -@@ -26,6 +26,7 @@ class PublicAPITestCase(unittest.TestCas - def test_aliases(self): - self.assertIs(astor.parse_file, astor.code_to_ast.parse_file) - -+ @unittest.skip("unittest2 required") - def test_codegen_from_root(self): - with self.assertWarns(DeprecationWarning) as cm: - astor = import_fresh_module('astor') -@@ -37,6 +38,7 @@ class PublicAPITestCase(unittest.TestCas - 'astor.codegen is deprecated. Please use astor.code_gen.' - ) - -+ @unittest.skip("unittest2 required") - def test_codegen_as_submodule(self): - with self.assertWarns(DeprecationWarning) as cm: - import astor.codegen