mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
ci: install pefile
This commit is contained in:
1
.github/workflows/build_test.sh
vendored
1
.github/workflows/build_test.sh
vendored
@@ -53,6 +53,7 @@ PACKAGES=(
|
||||
python3-evdev
|
||||
python3-jinja2
|
||||
python3-lxml
|
||||
python3-pefile
|
||||
python3-pip
|
||||
python3-pyparsing
|
||||
python3-setuptools
|
||||
|
||||
1
.github/workflows/unit_tests.sh
vendored
1
.github/workflows/unit_tests.sh
vendored
@@ -21,6 +21,7 @@ ADDITIONAL_DEPS=(
|
||||
libzstd-dev
|
||||
perl
|
||||
python3-libevdev
|
||||
python3-pefile
|
||||
python3-pyparsing
|
||||
rpm
|
||||
zstd
|
||||
|
||||
1
README
1
README
@@ -207,6 +207,7 @@ REQUIREMENTS:
|
||||
docbook-xsl (optional, required for documentation)
|
||||
xsltproc (optional, required for documentation)
|
||||
python-jinja2
|
||||
python-pefile
|
||||
python-lxml (optional, required to build the indices)
|
||||
python >= 3.5
|
||||
meson >= 0.53.2
|
||||
|
||||
@@ -20,6 +20,12 @@ try:
|
||||
except ImportError:
|
||||
sys.exit(77)
|
||||
|
||||
try:
|
||||
# pyflakes: noqa
|
||||
import pefile # noqa
|
||||
except ImportError:
|
||||
sys.exit(77)
|
||||
|
||||
# We import ukify.py, which is a template file. But only __version__ is
|
||||
# substituted, which we don't care about here. Having the .py suffix makes it
|
||||
# easier to import the file.
|
||||
|
||||
@@ -20,7 +20,6 @@ import subprocess
|
||||
import tempfile
|
||||
import typing
|
||||
|
||||
import pefile
|
||||
|
||||
__version__ = '{{GIT_VERSION}}'
|
||||
|
||||
@@ -66,6 +65,8 @@ def shell_join(cmd):
|
||||
|
||||
|
||||
def pe_executable_size(filename):
|
||||
import pefile
|
||||
|
||||
pe = pefile.PE(filename)
|
||||
section = pe.sections[-1]
|
||||
return section.VirtualAddress + section.Misc_VirtualSize
|
||||
|
||||
Reference in New Issue
Block a user