diff options
author | Thomas Bechtold <thomasbechtold@jpberlin.de> | 2020-03-24 04:33:44 +0000 |
---|---|---|
committer | Thomas Bechtold <thomasbechtold@jpberlin.de> | 2020-03-24 04:33:44 +0000 |
commit | ee80b94c489ca686d89646c0183fad11196d8a55 (patch) | |
tree | 2b2df4e84e9e2cb49634bfdbddf3e5fe6d2e2e4a | |
parent | cca560b7d9f4692850defb7606bb2ed8688d472c (diff) | |
parent | be215eb86f83246a418fc36208ce2e54b60adb59 (diff) | |
download | d-feet-ee80b94c489ca686d89646c0183fad11196d8a55.tar.gz |
Merge branch 'pythonpath' into 'master'
Make python installation used configurable
See merge request GNOME/d-feet!23
-rw-r--r-- | meson.build | 11 | ||||
-rw-r--r-- | meson_options.txt | 1 | ||||
-rw-r--r-- | src/tests/meson.build | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/meson.build b/meson.build index ba53385..4d3ee71 100644 --- a/meson.build +++ b/meson.build @@ -11,6 +11,7 @@ df_prefix = get_option('prefix') df_bindir = get_option('bindir') df_datadir = get_option('datadir') df_libdir = get_option('libdir') +df_python = get_option('python') df_pkgdatadir = df_datadir / df_name df_pkglibdir = df_libdir / df_name @@ -19,11 +20,7 @@ df_namespace = 'org.gnome.dfeet' gnome = import('gnome') i18n = import('i18n') -python = import('python').find_installation('python3') - -# FIXME: workaround for missing path method -# https://github.com/mesonbuild/meson/pull/4616 -python_path = find_program('python3').path() +python = import('python').find_installation(df_python) source_root = meson.current_source_dir() @@ -37,7 +34,7 @@ df_conf = configuration_data() values = [ # python - ['PYTHON', python_path], + ['PYTHON', python.path()], ['pythondir', python.get_install_dir()], # directories ['pkglibdir', df_prefix / df_pkglibdir], @@ -72,6 +69,6 @@ meson.add_install_script( 'meson_post_install.py', df_datadir, gio_schemasdir, - python_path, + python.path(), python.get_install_dir(), ) diff --git a/meson_options.txt b/meson_options.txt index 28e83bb..cd83bda 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('tests', type: 'boolean', value: true, description: 'build tests') +option('python', type: 'string', value: 'python3', description: 'Python installation to use') diff --git a/src/tests/meson.build b/src/tests/meson.build index b185953..19f819b 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -1,5 +1,5 @@ test_conf = configuration_data() -test_conf.set('PYTHON', python_path) +test_conf.set('PYTHON', python.path()) test_conf.set('DATA_DIR', data_dir) test_conf.set('SRC_DIR', src_dir) |