summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-09-30 11:48:46 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-09-30 11:48:46 +0100
commitddc282f6ca84dc6e6e5586a0addfa82a74e6e761 (patch)
treec8a09a3218395da09f828fe00fa1e8da019034bd
parent4f529e03c77a98fa8ab3d7c939e79e6f2bf32577 (diff)
downloadpango-ddc282f6ca84dc6e6e5586a0addfa82a74e6e761.tar.gz
build: Remove deprecated python3 Meson module use
We are using the deprecated python3 module for historical reasons. We used to support both Python 2 and Python 3 in the Autotools build, but since we switched to Meson we *know* we have Python 3 available. This allows us to use a shebang line in the Python scripts we use in the build, instead of invoking them through the Python interpreter in a custom target; Meson knows how to handle shebangs portably as well. This change removes the only deprecation warning coming from Meson when configuring the Pango build.
-rw-r--r--tests/gen-all-unicode.py2
-rw-r--r--tests/gen-installed-test.py2
-rw-r--r--tests/meson.build5
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/gen-all-unicode.py b/tests/gen-all-unicode.py
index 011ab9d2..c30cfc49 100644
--- a/tests/gen-all-unicode.py
+++ b/tests/gen-all-unicode.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+
import sys
# From glib/gutf8.c:
diff --git a/tests/gen-installed-test.py b/tests/gen-installed-test.py
index 794ea107..eeb4abee 100644
--- a/tests/gen-installed-test.py
+++ b/tests/gen-installed-test.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+
import sys
import argparse
import os
diff --git a/tests/meson.build b/tests/meson.build
index 6e10e2b7..b962a758 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -141,14 +141,13 @@ if get_option('install-tests')
install_data(installed_test_items_data, install_dir: join_paths(installed_test_bindir, 'itemize'))
endif
-python = import('python3').find_python()
gen_installed_test = files([ 'gen-installed-test.py' ])
gen_all_unicode = files([ 'gen-all-unicode.py' ])
custom_target('all-unicode',
output: 'all-unicode.txt',
command: [
- python, gen_all_unicode, '@OUTPUT@'
+ gen_all_unicode, '@OUTPUT@'
],
install: get_option('install-tests'),
install_dir: installed_test_bindir)
@@ -161,7 +160,7 @@ foreach t: tests
custom_target(name + '.test',
output: name + '.test',
command: [
- python, gen_installed_test,
+ gen_installed_test,
installed_test_bindir,
name,
'@OUTDIR@',