diff --git a/fix-collections-import-MutableMapping.patch b/fix-collections-import-MutableMapping.patch deleted file mode 100644 index c1d7d50..0000000 --- a/fix-collections-import-MutableMapping.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 923c498fd2c3c9805c613f8ac33e5572b9a784e2 Mon Sep 17 00:00:00 2001 -From: Scott Johnson -Date: Sat, 22 Jun 2019 05:16:23 -0700 -Subject: [PATCH] Fix deprecation warning in Python 3.7 (#231) - -$SITE_PYTHON/lib/python3.7/site-packages/elftools/construct/lib/container.py:5 - Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working - -This change is compatible with Python 3.3 and up, when the ABCs were -moved to collections.abc. Backward compatibility is retained through -the try/except block. ---- - elftools/construct/lib/container.py | 2 +- - elftools/construct/lib/py3compat.py | 5 +++++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/elftools/construct/lib/container.py b/elftools/construct/lib/container.py -index 2f89b2dc..5a580fac 100644 ---- a/elftools/construct/lib/container.py -+++ b/elftools/construct/lib/container.py -@@ -2,8 +2,8 @@ - Various containers. - """ - --from collections import MutableMapping - from pprint import pformat -+from .py3compat import MutableMapping - - def recursion_lock(retval, lock_name = "__recursion_lock__"): - def decorator(func): -diff --git a/elftools/construct/lib/py3compat.py b/elftools/construct/lib/py3compat.py -index 4a52c293..1cbae81d 100644 ---- a/elftools/construct/lib/py3compat.py -+++ b/elftools/construct/lib/py3compat.py -@@ -6,6 +6,11 @@ - import sys - PY3 = sys.version_info[0] == 3 - -+try: -+ from collections.abc import MutableMapping # python >= 3.3 -+except ImportError: -+ from collections import MutableMapping # python < 3.3 -+ - - if PY3: - import io - \ No newline at end of file diff --git a/pyelftools-0.25.tar.gz b/pyelftools-0.25.tar.gz deleted file mode 100644 index 41cdb06..0000000 Binary files a/pyelftools-0.25.tar.gz and /dev/null differ diff --git a/pyelftools-0.27.tar.gz b/pyelftools-0.27.tar.gz new file mode 100644 index 0000000..3c6a4e0 Binary files /dev/null and b/pyelftools-0.27.tar.gz differ diff --git a/pyelftools.spec b/pyelftools.spec index 095b015..a564ef4 100644 --- a/pyelftools.spec +++ b/pyelftools.spec @@ -1,21 +1,22 @@ +%global debug_package %{nil} + Name: pyelftools -Version: 0.25 -Release: 4 +Version: 0.27 +Release: 1 License: Public Domain Summary: Pure-Python library for parsing and analyzing ELF files URL: https://github.com/eliben/pyelftools -Source0: https://files.pythonhosted.org/packages/source/p/pyelftools/pyelftools-%{version}.tar.gz -Patch0: fix-collections-import-MutableMapping.patch -BuildRequires: python3-devel python3-setuptools -BuildArch: noarch +Source0: https://github.com/eliben/pyelftools/archive/v%{version}/%{name}-%{version}.tar.gz %description This package provides a python library for parsing and analyzing ELF files and DWARF debugging information. %package -n python3-pyelftools +Provides: bundled(python3-construct) = 2.6 +BuildRequires: python3-devel python3-setuptools +BuildArch: noarch Summary: Parsing ELF and DWARF in Python -Requires: python3-construct %{?python_provide:%python_provide python3-pyelftools} %description -n python3-pyelftools This package provides a python library for parsing and @@ -37,13 +38,17 @@ mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/pyreadelf %{__python3} test/run_readelf_tests.py || : %files -n python3-pyelftools -%doc CHANGES LICENSE +%license LICENSE +%doc CHANGES %{_bindir}/pyreadelf %{python3_sitelib}/elftools %{python3_sitelib}/pyelftools-*.egg-info %changelog +* Wed Jun 15 2022 duyiwei - 0.27-1 +- upgrade version to 0.27 + * Sat Jan 29 2022 caodongxia - 0.25-4 - fix collections import MutableMapping