From: Daniel Wagner Date: Thu, 21 Oct 2021 07:19:38 +0000 (+0200) Subject: Merge pull request #8 from birkelund/types X-Git-Tag: v1.0-rc0~73 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0fe08fbbb625427c1efb7a3cca276472ca0f859a;p=users%2Fsagi%2Flibnvme.git Merge pull request #8 from birkelund/types Header cleanup (make nvme/types.h independent of Linux and usable without linking) --- 0fe08fbbb625427c1efb7a3cca276472ca0f859a diff --cc pynvme/meson.build index bde1536b,079536cf..2955959f --- a/pynvme/meson.build +++ b/pynvme/meson.build @@@ -5,21 -5,12 +5,21 @@@ # # Authors: Martin Belanger # -python3 = import('python').find_installation('python3') -swig = find_program('swig', required: false) -if swig.found() + +want_python = get_option('python') +if want_python != 'false' + python3 = import('python').find_installation('python3') + py3_dep = python3.dependency(required: want_python == 'true') + swig = find_program('swig', required: want_python == 'true') + have_python_support = py3_dep.found() and swig.found() +else + have_python_support = false +endif + +if have_python_support pymod_swig = custom_target( 'nvme.py', - input: ['nvme.i', config_h], + input: ['nvme.i', config_host_h, ccan_config_h], output: ['nvme.py', 'nvme_wrap.c'], command: [swig, '-python', '-py3', '-o', '@OUTPUT1@', '@INPUT0@'], install: true,