Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion granulate_utils/linux/elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
import hashlib
from typing import Optional, cast

from elftools.elf.elffile import ELFFile # type: ignore
from elftools.elf.elffile import ELFError, ELFFile # type: ignore
from elftools.elf.sections import NoteSection # type: ignore


__all__ = ["ELFError"]


def get_elf_arch(path: str) -> str:
"""
Gets the file architecture embedded in the ELF file section
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dataclasses~=0.8; python_version < '3.7'
typing-extensions>=4.1.0
pyelftools~=0.28
packaging~=21.2
importlib_metadata~=4.8
Copy link
Contributor Author

@tomersa tomersa Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was added in order to pass the tests (They were broken on master because of this import). See the comment below from the commit for more details:

    * Tests fail on python3.7 because of a problem with the importlib_metadata package.
    The issue was fixed using the workaround suggested here: https://github.com/python/importlib_metadata/issues/406#issuecomment-1264682770

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the issue is actually with flake8, so I wouldn't put this in the requirements.txt, I'd put a pip install for this in the CI workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.