From 2c5680d7218d421be22e07598abe4f8f6c385187 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 9 Dec 2016 18:57:52 +0530 Subject: python3 dep: Check arch of libraries before using On Windows, we can build with both 32-bit and 64-bit compilers, but the Python is either 32-bit or 64-bit. Check the architecture of the found Python libraries and don't use them if they don't match our build_machine. Also skip the tests if the Python 3 dependency is not found. --- test cases/python3/2 extmodule/meson.build | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test cases/python3/2 extmodule/meson.build') diff --git a/test cases/python3/2 extmodule/meson.build b/test cases/python3/2 extmodule/meson.build index 858bbea9f..92a12b259 100644 --- a/test cases/python3/2 extmodule/meson.build +++ b/test cases/python3/2 extmodule/meson.build @@ -3,10 +3,14 @@ project('Python extension module', 'c', # Because Windows Python ships only with optimized libs, # we must build this project the same way. -py3_dep = dependency('python3') +py3_dep = dependency('python3', required : false) -subdir('ext') +if py3_dep.found() + subdir('ext') -test('extmod', - find_program('blaster.py'), - env : ['PYTHONPATH=' + pypathdir]) + test('extmod', + find_program('blaster.py'), + env : ['PYTHONPATH=' + pypathdir]) +else + error('MESON_SKIP_TEST: Python3 libraries not found, skipping test.') +endif -- cgit v1.2.3