Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
df6e95f2da
!14 【openEuler-22.03-LTS-Next】upgrade version to 0.27
From: @wu-leilei 
Reviewed-by: @licihua 
Signed-off-by: @licihua
2022-10-13 08:34:29 +00:00
wu-leilei
4439182b46 package upgrade 2022-10-13 16:14:28 +08:00
openeuler-ci-bot
a1c8a479f3 !6 disable python2
From: @jackie_wu123
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-11-02 11:59:20 +08:00
jackie_wu
6817a5daea disable python2 2020-11-02 09:46:22 +08:00
openeuler-ci-bot
cd9f8430b2 !3 add yaml file
Merge pull request !3 from ultra_planet/master
2020-05-11 15:18:18 +08:00
ultra_planet
dd2806bdca add yaml file 2020-05-09 09:36:30 +08:00
openeuler-ci-bot
405816463c !2 Delete two file
Merge pull request !2 from gu-gu-gu/Del
2020-01-20 15:37:42 +08:00
wanjk19
7fb1ad7757 delete files 2020-01-20 11:26:23 +08:00
openeuler-ci-bot
f97ab86a13 !1 Modify file
Merge pull request !1 from gu-gu-gu/Mod
2020-01-20 11:15:32 +08:00
wanjk19
f824545f48 modify file 2020-01-16 16:44:13 +08:00
5 changed files with 28 additions and 156 deletions

View File

@ -1,127 +0,0 @@
diff --git a/elftools/common/construct_utils.py b/elftools/common/construct_utils.py
index 8ace30e..321ab51 100644
--- a/elftools/common/construct_utils.py
+++ b/elftools/common/construct_utils.py
@@ -6,7 +6,7 @@
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
-from ..construct import Subconstruct, ConstructError, ArrayError
+from construct import Subconstruct, ConstructError, ArrayError
class RepeatUntilExcluding(Subconstruct):
diff --git a/elftools/common/utils.py b/elftools/common/utils.py
index d8acefa..f6d017c 100644
--- a/elftools/common/utils.py
+++ b/elftools/common/utils.py
@@ -9,7 +9,7 @@
from contextlib import contextmanager
from .exceptions import ELFParseError, ELFError, DWARFError
from .py3compat import int2byte
-from ..construct import ConstructError
+from construct import ConstructError
def bytelist2string(bytelist):
diff --git a/elftools/dwarf/enums.py b/elftools/dwarf/enums.py
index 9140f91..17f5c74 100644
--- a/elftools/dwarf/enums.py
+++ b/elftools/dwarf/enums.py
@@ -6,7 +6,7 @@
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
-from ..construct import Pass
+from construct import Pass
from ..common.py3compat import iteritems
diff --git a/elftools/dwarf/structs.py b/elftools/dwarf/structs.py
index e25dc84..cfc4a85 100644
--- a/elftools/dwarf/structs.py
+++ b/elftools/dwarf/structs.py
@@ -7,7 +7,7 @@
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
-from ..construct import (
+from construct import (
UBInt8, UBInt16, UBInt32, UBInt64, ULInt8, ULInt16, ULInt32, ULInt64,
SBInt8, SBInt16, SBInt32, SBInt64, SLInt8, SLInt16, SLInt32, SLInt64,
Adapter, Struct, ConstructError, If, RepeatUntil, Field, Rename, Enum,
diff --git a/elftools/elf/enums.py b/elftools/elf/enums.py
index dbeb20e..5767d41 100644
--- a/elftools/elf/enums.py
+++ b/elftools/elf/enums.py
@@ -6,7 +6,7 @@
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
-from ..construct import Pass
+from construct import Pass
# e_ident[EI_CLASS] in the ELF header
diff --git a/elftools/elf/gnuversions.py b/elftools/elf/gnuversions.py
index 4a4473f..d4f4b75 100644
--- a/elftools/elf/gnuversions.py
+++ b/elftools/elf/gnuversions.py
@@ -6,7 +6,7 @@
# Yann Rouillard (yann@pleiades.fr.eu.org)
# This code is in the public domain
#------------------------------------------------------------------------------
-from ..construct import CString
+from construct import CString
from ..common.utils import struct_parse, elf_assert
from .sections import Section, Symbol
diff --git a/elftools/elf/notes.py b/elftools/elf/notes.py
index b3a41d6..526135c 100644
--- a/elftools/elf/notes.py
+++ b/elftools/elf/notes.py
@@ -8,7 +8,7 @@
#-------------------------------------------------------------------------------
from ..common.py3compat import bytes2str
from ..common.utils import struct_parse, roundup
-from ..construct import CString
+from construct import CString
def iter_notes(elffile, offset, size):
diff --git a/elftools/elf/segments.py b/elftools/elf/segments.py
index c1c0279..8464248 100644
--- a/elftools/elf/segments.py
+++ b/elftools/elf/segments.py
@@ -6,7 +6,7 @@
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
-from ..construct import CString
+from construct import CString
from ..common.utils import struct_parse
from .constants import SH_FLAGS
from .notes import iter_notes
diff --git a/elftools/elf/structs.py b/elftools/elf/structs.py
index d2404ab..2570b4f 100644
--- a/elftools/elf/structs.py
+++ b/elftools/elf/structs.py
@@ -7,7 +7,7 @@
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
-from ..construct import (
+from construct import (
UBInt8, UBInt16, UBInt32, UBInt64,
ULInt8, ULInt16, ULInt32, ULInt64,
SBInt32, SLInt32, SBInt64, SLInt64,
--- a/setup.py~ 2016-08-05 05:18:18.000000000 +0200
+++ b/setup.py 2018-06-17 13:51:23.961881845 +0200
@@ -41,7 +41,6 @@
'elftools.elf',
'elftools.common',
'elftools.dwarf',
- 'elftools.construct', 'elftools.construct.lib',
],
scripts=['scripts/readelf.py']

Binary file not shown.

BIN
pyelftools-0.27.tar.gz Normal file

Binary file not shown.

View File

@ -1,29 +1,22 @@
%global debug_package %{nil}
Name: pyelftools
Version: 0.24
Release: 4
Version: 0.27
Release: 1
License: Public Domain
Summary: Parsing ELF and DWARF in Python
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
Patch0001: pyelftools-0.24-construct.patch
BuildRequires: python2-devel python2-setuptools python2-construct python3-devel python3-setuptools python3-construct
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 python2-pyelftools
Summary: Parsing ELF and DWARF in Python
Requires: python2-construct
%{?python_provide:%python_provide python2-pyelftools}
%description -n python2-pyelftools
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
@ -31,35 +24,37 @@ analyzing ELF files and DWARF debugging information.
%prep
%autosetup -p1
rm -rf elftools/construct
%build
%{py2_build}
%{py3_build}
%install
%{py2_install}
mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/py2readelf
%{py3_install}
mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/pyreadelf
%check
%{__python2} test/run_all_unittests.py
%{__python2} test/run_examples_test.py
%{__python2} test/run_readelf_tests.py || :
%{__python3} test/run_all_unittests.py
%{__python3} test/run_examples_test.py
%{__python3} test/run_readelf_tests.py || :
%files -n python2-pyelftools
%doc CHANGES LICENSE
%{_bindir}/py2readelf
%{python2_sitelib}/*
%files -n python3-pyelftools
%doc CHANGES LICENSE
%license LICENSE
%doc CHANGES
%{_bindir}/pyreadelf
%{python3_sitelib}/*
%{python3_sitelib}/elftools
%{python3_sitelib}/pyelftools-*.egg-info
%changelog
* Thu Oct 13 2022 wulei <wulei80@h-partners.com> - 0.27-1
- upgrade version to 0.27
* Wed Oct 21 2020 wutao <wutao61@huawei.com> - 0.25-3
- delete python2 modules
* Thu Jan 16 2020 wanjiankang<wanjiankang@huawei.com> - 0.25-2
- update to 0.25-2
* Tue Dec 2 2019 likexin<likexin4@huawei.com> - 0.24-4
- Package init

4
pyelftools.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: pyelftools
tag_prefix: "^v"
seperator: "."