Skip to content

Commit

Permalink
Merge pull request #55 from rizinorg/meson-wheel-option
Browse files Browse the repository at this point in the history
Add meson option for wheel build
  • Loading branch information
wargio authored Mar 15, 2024
2 parents 7da2b62 + 70b2c55 commit 1caa623
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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]
Expand All @@ -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())
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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: '')
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1caa623

Please sign in to comment.