diff --git a/drop-nose-requirement.patch b/drop-nose-requirement.patch index 57aefcc..9eec7bd 100644 --- a/drop-nose-requirement.patch +++ b/drop-nose-requirement.patch @@ -1,8 +1,16 @@ -Index: columnize-0.3.10/setup.py -=================================================================== ---- columnize-0.3.10.orig/setup.py -+++ columnize-0.3.10/setup.py -@@ -34,6 +34,5 @@ setup( +--- + setup.py | 2 -- + 1 file changed, 2 deletions(-) + +--- a/setup.py ++++ b/setup.py +@@ -28,12 +28,10 @@ setup( + long_description = long_description, + long_description_content_type = "text/x-rst", + name = modname, +- test_suite = 'nose.collector', + url = web, + version = VERSION, py_modules = py_modules, install_requires = install_requires, tests_require = tests_require, diff --git a/python-columnize-no-mock.patch b/python-columnize-no-mock.patch index 9f60de7..dc2855a 100644 --- a/python-columnize-no-mock.patch +++ b/python-columnize-no-mock.patch @@ -1,7 +1,10 @@ -Index: columnize-0.3.10/__pkginfo__.py -=================================================================== ---- columnize-0.3.10.orig/__pkginfo__.py 2020-04-17 03:02:33.000000000 +0200 -+++ columnize-0.3.10/__pkginfo__.py 2022-03-08 07:53:57.177335010 +0100 +--- + __pkginfo__.py | 2 +- + test_columnize.py | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- a/__pkginfo__.py ++++ b/__pkginfo__.py @@ -45,7 +45,7 @@ exec( ) ) @@ -11,10 +14,8 @@ Index: columnize-0.3.10/__pkginfo__.py web = "https://github.com/rocky/pycolumnize" # tracebacks in zip files are funky and not debuggable zip_safe = False -Index: columnize-0.3.10/test_columnize.py -=================================================================== ---- columnize-0.3.10.orig/test_columnize.py 2022-03-08 07:53:49.941293417 +0100 -+++ columnize-0.3.10/test_columnize.py 2022-03-08 07:56:36.710251987 +0100 +--- a/test_columnize.py ++++ b/test_columnize.py @@ -1,7 +1,8 @@ #!/usr/bin/env python # -*- Python -*- diff --git a/python-columnize.changes b/python-columnize.changes index 3e098a0..4c05954 100644 --- a/python-columnize.changes +++ b/python-columnize.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 8 10:13:54 UTC 2022 - Matej Cepl + +- Rearrange and reapply patches. + ------------------------------------------------------------------- Tue Mar 8 06:50:19 UTC 2022 - pgajdos@suse.com diff --git a/python-columnize.spec b/python-columnize.spec index 39969d3..25214c9 100644 --- a/python-columnize.spec +++ b/python-columnize.spec @@ -27,14 +27,17 @@ Summary: Format a simple (i.e. not nested) list into aligned columns URL: https://github.com/rocky/pycolumnize Group: Development/Languages/Python Source0: https://files.pythonhosted.org/packages/source/c/columnize/columnize-%{version}.tar.gz -# Include test file missed from being included in source tarball -Source1: https://raw.githubusercontent.com/rocky/pycolumnize/%{version}/test_columnize.py +# Include test file missed from being included in source tarball gh#rocky/pycolumnize#29 +# https://raw.githubusercontent.com/rocky/pycolumnize/%%{version}/test_columnize.py +Source1: test_columnize.py # PATCH-FEATURE-OPENSUSE drop-nose-requirement.patch badshah400@gmail.com -- Drop requirement on outdated nose; we do not run tests anyway Patch0: drop-nose-requirement.patch +# PATCH-FIX-UPSTREAM python-columnize-no-mock.patch gh#rocky/pycolumnize#28 mcepl@suse.com +# remove the need for external mock package +Patch1: python-columnize-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros # SECTION For tests -BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest} # /SECTION BuildRequires: fdupes @@ -48,8 +51,6 @@ Format a simple (i.e. not nested) list into aligned columns. %prep %autosetup -p1 -n columnize-%{version} cp %{SOURCE1} ./ -# https://github.com/rocky/pycolumnize/issues/28 -sed -i 's:mock:unittest.mock:' test_columnize.py %build %python_build