diff --git a/meson.build b/meson.build index 3d6214c..e15a642 100644 --- a/meson.build +++ b/meson.build @@ -108,6 +108,7 @@ if target_swig or target_sphinx endif if target_swig + wheel = get_option('wheel') swig_output = custom_target( 'swig_output', input: bindgen_outputs[swig_source_idx], @@ -117,7 +118,7 @@ if target_swig '-python', '-c++', '-outdir', '@OUTDIR@', '@INPUT@' ], - install: host_machine.system() == 'windows', + install: wheel or host_machine.system() == 'windows', install_dir: [py.get_install_dir(), false] ) swig_py = swig_output[0] @@ -134,7 +135,7 @@ if target_swig py.dependency(), rz_core, ], - install: host_machine.system() == 'windows', + install: wheel or host_machine.system() == 'windows', ) if host_machine.system() != 'windows' meson.add_install_script('py_install.py', swig_py.full_path(), ext_mod.full_path()) diff --git a/meson_options.txt b/meson_options.txt index d2ee304..8833e19 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,5 +4,6 @@ option('rizin_include_path', type: 'string', value: '') option('targets', type: 'array', choices: ['SWIG', 'sphinx'], value: ['SWIG']) option('plugin', type: 'feature', value: 'disabled') +option('wheel', type: 'boolean', value: false, description: 'Set up for pypa wheel build') option('doxygen_path', type: 'string', value: '') diff --git a/pyproject.toml b/pyproject.toml index 05b0ffb..851fa93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,9 @@ requires = [ ] build-backend = "mesonpy" +[tool.meson-python.args] +setup = ['-Dwheel=true'] + [tool.cibuildwheel] build-verbosity = 3 before-all = "bash {project}/cibw_before_all.sh"