[gnome-tweaks/wip/christopherdavis/python3-deprecation-fix: 87/87] build: Use python module instead of deprecated python3 module
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks/wip/christopherdavis/python3-deprecation-fix: 87/87] build: Use python module instead of deprecated python3 module
- Date: Sat, 24 Oct 2020 04:06:57 +0000 (UTC)
commit f0deae535481bd6e728add84017ca0d7a703e406
Author: Mart Raudsepp <leio gentoo org>
Date: Tue Feb 26 13:43:27 2019 -0500
build: Use python module instead of deprecated python3 module
The meson python3 module is deprecated and tends install only
to a python version that meson is installed for too, possibly
breaking some expectations downstream that want it installed to
a specific python3 version.
The python module exists since 0.46, which should be safe to require
by now.
Co-authored-by: Christopher Davis <brainblasted disroot org>
gtweak/meson.build | 5 ++---
meson.build | 13 +++++++++----
2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/gtweak/meson.build b/gtweak/meson.build
index 052b7cb4..a491f6a4 100644
--- a/gtweak/meson.build
+++ b/gtweak/meson.build
@@ -11,7 +11,6 @@ configure_file(
input: 'defs.py.in',
output: 'defs.py',
configuration: defs_conf,
- install: true,
install_dir: gtweakdir
)
@@ -44,5 +43,5 @@ tweak_sources = [
'tweaks/tweak_wacom.py',
]
-install_data(shell_sources, install_dir: gtweakdir)
-install_data(tweak_sources, install_dir: gtweakdir + '/tweaks')
+python3.install_sources(shell_sources, subdir: 'gtweak')
+python3.install_sources(tweak_sources, subdir: join_paths('gtweak', 'tweaks'))
diff --git a/meson.build b/meson.build
index b7da5186..b1571df9 100644
--- a/meson.build
+++ b/meson.build
@@ -1,11 +1,16 @@
project('gnome-tweaks',
version: '3.34.0',
- meson_version: '>= 0.40.0'
+ meson_version: '>= 0.46.0'
)
gnome = import('gnome')
i18n = import('i18n')
-python3 = import('python3')
+python = import('python')
+python3 = python.find_installation('python3')
+
+if not python3.found()
+ error('No valid python3 installation found!')
+endif
prefix = get_option('prefix')
@@ -13,13 +18,13 @@ bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
localedir = join_paths(prefix, get_option('localedir'))
-pythondir = join_paths(prefix, python3.sysconfig_path('purelib'))
+pythondir = join_paths(prefix, python3.get_path('purelib'))
pkgdatadir = join_paths(datadir, meson.project_name())
appdatadir = join_paths(datadir, 'metainfo')
desktopdir = join_paths(datadir, 'applications')
-gtweakdir = join_paths(pythondir, 'gtweak')
+gtweakdir = python3.get_install_dir(subdir: 'gtweak')
icondir = join_paths(datadir, 'icons', 'hicolor')
schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]