From 6a1427401c76db73081e478c4ff49fcc75420de6 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 6 Mar 2023 21:37:29 -0500 Subject: tests: add a python test for bytecode compilation Some tweaks are added to the test case so that it supports python2 as well. --- test cases/python/2 extmodule/meson.build | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test cases/python/2 extmodule/meson.build') diff --git a/test cases/python/2 extmodule/meson.build b/test cases/python/2 extmodule/meson.build index 079463160..65f9177c0 100644 --- a/test cases/python/2 extmodule/meson.build +++ b/test cases/python/2 extmodule/meson.build @@ -10,6 +10,7 @@ endif py_mod = import('python') py = py_mod.find_installation() +py2 = py_mod.find_installation('python2', required: get_option('python2'), disabler: true) py_dep = py.dependency(required: false) if not py_dep.found() @@ -31,6 +32,12 @@ test('extmod', py.install_sources(blaster, pure: false) py.install_sources(blaster, subdir: 'pure') +install_subdir('subinst', install_dir: py.get_install_dir(pure: false)) + +py2.install_sources(blaster, pure: false) +py2.install_sources(blaster, subdir: 'pure') +install_subdir('subinst', install_dir: py2.get_install_dir(pure: false)) + py3_pkg_dep = dependency('python3', method: 'pkg-config', required : false) if py3_pkg_dep.found() -- cgit v1.2.3