pyelftools/pyelftools-0.24-construct.patch
Terje Røsten 25ae9af04d 0.24
some clean up
remove naked provide for Fedora 29 and later
switch to Python 3 for pyreadelf for Fedora 29 and later
2018-06-17 14:45:15 +02:00

128 lines
4.6 KiB
Diff

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']