14
0
forked from pool/python-pylzma

Accepting request 919099 from home:pgajdos:python

- %check: use %pyunittest_arch rpm macro
- added patches
  fix https://github.com/fancycode/pylzma/issues/76
  + python-pylzma-test-python3.patch

OBS-URL: https://build.opensuse.org/request/show/919099
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylzma?expand=0&rev=11
This commit is contained in:
2021-09-15 12:06:13 +00:00
committed by Git OBS Bridge
parent 024384c5d1
commit bf583f0780
3 changed files with 26 additions and 2 deletions

View File

@@ -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

View File

@@ -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 <mpluskal@suse.com> Wed Jan 2 14:09:12 UTC 2019 - Martin Pluskal <mpluskal@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-pylzma # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,8 @@ License: LGPL-2.1-only
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/fancycode/pylzma URL: https://github.com/fancycode/pylzma
Source0: https://github.com/fancycode/pylzma/archive/v%{version}.tar.gz 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 devel}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
@@ -38,6 +40,7 @@ that has been compressed or can be decompressed by the LZMA library.
%prep %prep
%setup -q -n %{oname}-%{version} %setup -q -n %{oname}-%{version}
%patch0 -p1
# Remove Shebang # Remove Shebang
sed -i '1d' py7zlib.py sed -i '1d' py7zlib.py
@@ -50,7 +53,7 @@ sed -i '1d' py7zlib.py
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
%check %check
%python_exec setup.py test %pyunittest_arch discover -v
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE