From c78e43b964e89c16900fdc9d3137921bbd5def46 Mon Sep 17 00:00:00 2001 From: Aidan Harris Date: Mon, 12 Aug 2019 21:46:59 +0100 Subject: [PATCH] meson: Build fixes --- hawck-ui/meson.build | 4 +++- hawck-ui/setup.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hawck-ui/meson.build b/hawck-ui/meson.build index 645243b..c2f0b2f 100644 --- a/hawck-ui/meson.build +++ b/hawck-ui/meson.build @@ -15,4 +15,6 @@ run_target('hawck-ui', command : [python3.find_python(), 'setup.py', 'build'], ) -meson.add_install_script('install-hawck-ui.sh') +if get_option('use_meson_install') + meson.add_install_script('install-hawck-ui.sh') +endif diff --git a/hawck-ui/setup.py b/hawck-ui/setup.py index a7b9a56..dab2025 100755 --- a/hawck-ui/setup.py +++ b/hawck-ui/setup.py @@ -1,11 +1,13 @@ #!/usr/bin/python3 -import setuptools, json +import os, setuptools, json with open("README.md", "r") as fh: long_description = fh.read() -with open("../build/hawck-ui/setup_config.json") as rf: +MESON_BUILD_ROOT = os.environ.get('MESON_BUILD_ROOT') or '../build' + +with open(os.path.join(MESON_BUILD_ROOT, "hawck-ui/setup_config.json")) as rf: config = json.load(rf) setuptools.setup(