mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-09 07:08:10 +02:00
Don't modify powerprofilesctl at build time
Python version and binary used at build time might not be the same as the installed OS. Instead reference python3 from environment.
This commit is contained in:
parent
c750f7e791
commit
718fde54d2
2 changed files with 5 additions and 16 deletions
|
|
@ -98,20 +98,11 @@ executable('power-profiles-daemon',
|
|||
install_dir: libexecdir
|
||||
)
|
||||
|
||||
python = import('python')
|
||||
py_installation = python.find_installation('python3', required: true)
|
||||
|
||||
ppd_conf = configuration_data()
|
||||
ppd_conf.set('VERSION', meson.project_version())
|
||||
ppd_conf.set('PYTHON3', py_installation.full_path())
|
||||
|
||||
script = configure_file(
|
||||
input: 'powerprofilesctl.in',
|
||||
output: 'powerprofilesctl',
|
||||
configuration: ppd_conf,
|
||||
install_dir: get_option('bindir')
|
||||
script = 'powerprofilesctl'
|
||||
install_data(script,
|
||||
install_dir: get_option('bindir')
|
||||
)
|
||||
|
||||
script = join_paths(meson.current_source_dir(), script)
|
||||
if get_option('pylint')
|
||||
test('pylint-powerprofilesctl',
|
||||
pylint,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
#!@PYTHON3@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
from gi.repository import Gio, GLib
|
||||
|
||||
VERSION = "@VERSION@"
|
||||
|
||||
PP_NAME = "org.freedesktop.UPower.PowerProfiles"
|
||||
PP_PATH = "/org/freedesktop/UPower/PowerProfiles"
|
||||
PP_IFACE = "org.freedesktop.UPower.PowerProfiles"
|
||||
Loading…
Add table
Reference in a new issue