]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: install pefile
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 25 Nov 2022 18:14:42 +0000 (19:14 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 7 Dec 2022 14:53:47 +0000 (15:53 +0100)
.github/workflows/build_test.sh
.github/workflows/unit_tests.sh
README
src/ukify/test/test_ukify.py
src/ukify/ukify.py

index 1eed81600cc79c091bd3822c4b17ed2b8d11c992..0d18c6c18be3710f660020941d43e67140de65a7 100755 (executable)
@@ -53,6 +53,7 @@ PACKAGES=(
     python3-evdev
     python3-jinja2
     python3-lxml
+    python3-pefile
     python3-pip
     python3-pyparsing
     python3-setuptools
index 9a9fbb36ab5572466189ef7b0f8cb90e99b0e96d..70ba090eb8e60424bc66b72052356c1b4df4bb64 100755 (executable)
@@ -21,6 +21,7 @@ ADDITIONAL_DEPS=(
     libzstd-dev
     perl
     python3-libevdev
+    python3-pefile
     python3-pyparsing
     rpm
     zstd
diff --git a/README b/README
index d8c279f9fa287d6a133b4df1aa23d808d24f9c79..b12ad3f236094338129673169fbf90105be7cdc7 100644 (file)
--- a/README
+++ b/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
index a4afa56ad982222dad45bfd08140c4ed6cd619d8..48ffc6d4954ae368a2eb2e8f30cdcc7f7f493310 100755 (executable)
@@ -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.
index d4772d2bae0179c435956d82fdfb7965ed8a4bf3..83423fc720624f6dbcc6e2672b11231199b5401e 100755 (executable)
@@ -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