diff --git a/python-pylzma-test-python3.patch b/python-pylzma-test-python3.patch new file mode 100644 index 0000000..6f2c780 --- /dev/null +++ b/python-pylzma-test-python3.patch @@ -0,0 +1,13 @@ +Index: pylzma-0.5.0/tests/test_usage.py +=================================================================== +--- pylzma-0.5.0.orig/tests/test_usage.py 2018-09-26 20:36:11.000000000 +0200 ++++ pylzma-0.5.0/tests/test_usage.py 2021-09-15 11:19:08.201378252 +0200 +@@ -38,7 +38,7 @@ sys.path.insert(0, ROOT) + def cleanup(path): + try: + shutil.rmtree(path) +- except EnvironmentError, e: ++ except EnvironmentError as e: + if e.errno != errno.ENOENT: + raise + diff --git a/python-pylzma.changes b/python-pylzma.changes index 2d2f47b..7df28ff 100644 --- a/python-pylzma.changes +++ b/python-pylzma.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 15 09:20:27 UTC 2021 - pgajdos@suse.com + +- %check: use %pyunittest_arch rpm macro +- added patches + fix https://github.com/fancycode/pylzma/issues/76 + + python-pylzma-test-python3.patch + ------------------------------------------------------------------- Wed Jan 2 14:09:12 UTC 2019 - Martin Pluskal diff --git a/python-pylzma.spec b/python-pylzma.spec index f5c02f3..06b6524 100644 --- a/python-pylzma.spec +++ b/python-pylzma.spec @@ -1,7 +1,7 @@ # # spec file for package python-pylzma # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ License: LGPL-2.1-only Group: Development/Languages/Python URL: https://github.com/fancycode/pylzma Source0: https://github.com/fancycode/pylzma/archive/v%{version}.tar.gz +# https://github.com/fancycode/pylzma/issues/76 +Patch0: python-pylzma-test-python3.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -38,6 +40,7 @@ that has been compressed or can be decompressed by the LZMA library. %prep %setup -q -n %{oname}-%{version} +%patch0 -p1 # Remove Shebang sed -i '1d' py7zlib.py @@ -50,7 +53,7 @@ sed -i '1d' py7zlib.py %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -%python_exec setup.py test +%pyunittest_arch discover -v %files %{python_files} %license LICENSE