Skip to content
Snippets Groups Projects
Commit 71d74168 authored by Simon McVittie's avatar Simon McVittie
Browse files

build: Automatically use python3.5 if available


Steam Runtime 1 'scout' has python3.5 as a non-default Python 3 version,
and python3.2 as default.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent fcbee2c2
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,6 @@ pipeline {
cd src
meson \
--prefix="$(pwd)/_build/prefix" \
-Dpython=python3.5 \
-Dsrcdir=src \
_build
ninja -C _build
......
......@@ -120,7 +120,6 @@ build:scout:
meson \
--prefix="$(pwd)/_build/prefix" \
-Dpython=python3.5 \
-Dsrcdir=src \
--werror \
_build
......
......@@ -25,15 +25,9 @@ override_dh_auto_clean:
rm -fr debian/locales
override_dh_auto_configure:
if python3 -c 'if __import__("sys").version_info < (3, 5): raise SystemExit(1)'; then \
python=python3; \
else \
python=python3.5; \
fi; \
if ! meson _build \
--prefix=/usr/lib/pressure-vessel/relocatable \
-Dman=true \
-Dpython=/usr/bin/$$python \
-Dsrcdir=src \
-Dversion=$(DEB_VERSION) \
$(meson_options) \
......
......@@ -29,9 +29,17 @@ project(
)
prove = find_program('prove', required : false)
python = find_program(get_option('python'), required : true)
sh = find_program('sh', required : true)
# We'd like to use import('python').find_installation(), but before
# Meson 0.50 there was a bug where it didn't have a path() method,
# making it useless to us here.
if get_option('python') == ''
python = find_program('python3.5', 'python3', required : true)
else
python = find_program(get_option('python'), required : true)
endif
version = get_option('version')
if version == 'auto'
git_version_gen = run_command(
......
option('man', type : 'boolean', value : false, description : 'enable man pages')
option('python', type : 'string', value : 'python3')
option('python', type : 'string', value : '')
option('srcdir', type : 'string', value : '')
option('version', type : 'string', value : 'auto')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment