]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Merge pull request #8 from birkelund/types
authorDaniel Wagner <dwagner@suse.de>
Thu, 21 Oct 2021 07:19:38 +0000 (09:19 +0200)
committerGitHub <noreply@github.com>
Thu, 21 Oct 2021 07:19:38 +0000 (09:19 +0200)
Header cleanup (make nvme/types.h independent of Linux and usable without linking)

1  2 
pynvme/meson.build

index bde1536befba56ecc700e228af9df16b5a8869d5,079536cfd3b15d405e2e6139c9bd0cdecadc7331..2955959f3aad317ee59caf5e154724e33afa7891
@@@ -5,21 -5,12 +5,21 @@@
  #
  # Authors: Martin Belanger <Martin.Belanger@dell.com>
  #
 -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,