Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python3 shebang paths and add python option. #86

Merged
merged 1 commit into from
Jul 5, 2024
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
2 changes: 1 addition & 1 deletion contrib/reformat-code.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
#
# Copyright (C) 2017 Dell Inc.
#
Expand Down
2 changes: 1 addition & 1 deletion efi/generate_binary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
#
# Copyright (C) 2021 Javier Martinez Canillas <[email protected]>
# Copyright (C) 2021 Richard Hughes <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion efi/generate_sbat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
#
# Copyright (C) 2021 Javier Martinez Canillas <[email protected]>
# Copyright (C) 2021 Richard Hughes <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions efi/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
generate_sbat = find_program('generate_sbat.py', native: true)
generate_binary = find_program('generate_binary.py', native: true)
generate_sbat = [python3, files('generate_sbat.py')]
generate_binary = [python3, files('generate_binary.py')]

# get source version, falling back
git = find_program('git', required : false)
Expand Down
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ libexecdir = join_paths(prefix, get_option('libexecdir'))

genpeimg = find_program ('genpeimg', required: get_option('genpeimg'))

python3path = get_option('python')
if python3path == ''
python3 = import('python').find_installation('python3')
else
python3 = find_program(python3path)
endif

efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
host_cpu = host_machine.cpu_family()
if host_cpu == 'x86'
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ option('efi_sbat_distro_pkgname', type : 'string', value : '', description : 'SB
option('efi_sbat_distro_version', type : 'string', value : '', description : 'SBAT distribution version, e.g. fwupd-1.5.6.fc33')
option('efi_sbat_distro_url', type : 'string', value : '', description : 'SBAT distribution URL, e.g. https://src.fedoraproject.org/rpms/fwupd')
option('genpeimg', type : 'feature', description : 'Use genpeimg to add NX support to binaries')
option('python', type : 'string', description : 'the absolute path of the python3 binary')