Skip to content

Commit

Permalink
move pure keyword from find_installation() to install_sources() and b…
Browse files Browse the repository at this point in the history
…ring back hacky platlib dir for compatibility with ubuntu 22.04's ancient meson version
  • Loading branch information
jason committed Jul 26, 2024
1 parent 7a85efb commit 4bc80f1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lcm-python/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,32 @@ else
endif

if not is_disabler(proceed_build)
py_installation = pymod.find_installation(pure : false)
py_installation = pymod.find_installation()
python_site = py_installation.get_path('platlib').replace(py_installation.get_path('data') / '', '')
python_include = py_installation.get_path('include')
if windows
# lcm_python_lib = py_installation.extension_module('_lcm', lcm_python_sources,
# dependencies : lcm_static_lib_dep,
# include_directories : include_directories(python_include),
# subdir : 'lcm',
# install_dir : python_site / 'lcm',
# install : true)
error_messages += ['Python not currently supported in this LCM build for Windows! Not building.']
elif host_machine.system() == 'darwin' #macos
lcm_python_lib = py_installation.extension_module('_lcm', lcm_python_sources,
dependencies : lcm_static_lib_dep,
include_directories : include_directories(python_include),
link_args : '-undefined dynamic_lookup -Wl,-no_fixup_chains',
subdir : 'lcm',
install_dir : python_site / 'lcm',
install : true)
else
lcm_python_lib = py_installation.extension_module('_lcm', lcm_python_sources,
dependencies : lcm_static_lib_dep,
include_directories : include_directories(python_include),
subdir : 'lcm',
install_dir : python_site / 'lcm',
install : true)
endif

py_installation.install_sources('lcm/__init__.py', subdir : 'lcm',)
py_installation.install_sources('lcm/__init__.py', subdir : 'lcm', pure : false)
endif

summary({'Build Python bindings and utilities' : not is_disabler(proceed_build)},
Expand Down

0 comments on commit 4bc80f1

Please sign in to comment.