-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/meson support #522
base: master
Are you sure you want to change the base?
Conversation
lcm-python/meson.build
Outdated
if windows | ||
lcm_python_lib = library('lcm-python', lcm_python_sources, | ||
dependencies : lcm_static_lib_dep, | ||
include_directories : include_directories(python_include), | ||
install_dir : python_site + '/lcm', | ||
name_suffix : '.pyd') | ||
elif host_machine.system() == 'darwin' #macos | ||
lcm_python_lib = library('lcm-python', lcm_python_sources, | ||
dependencies : lcm_static_lib_dep, | ||
include_directories : include_directories(python_include), | ||
install_dir : python_site + '/lcm', | ||
link_args : '-undefined dynamic_lookup -Wl,-no_fixup_chains') | ||
else | ||
lcm_python_lib = library('lcm-python', lcm_python_sources, | ||
dependencies : lcm_static_lib_dep, | ||
include_directories : include_directories(python_include), | ||
install_dir : python_site + '/lcm') | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want a Python extension module rather than library
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to extension_module and set up install: 7ebd789
c09c279
to
2918a0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a section to the build instructions documenting how to build LCM using meson?
5a2e0f9
to
5be306d
Compare
Done: 5be306d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is starting to look pretty good. Thanks for your work on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the Cmake support does this is it creates a python/lcm/
directory in the build directory which contains both the library and __init__.py
. As it currently is, a user would have to import _lcm
which isn't in line with the docs.
You might be able to recreate something similar here by removing these extension_module
calls to an lcm
subdir. Then you might be able to copy in the __init__.py
by using a meson function like configure_file
, although you might have to resort to one of the newer features like the filesystem module.
531fabc
to
daedc52
Compare
fc13eb2
to
946bf68
Compare
…onforming directory i.e. bin
fix python library installation and remove comment
…instead of unused option
…ring back hacky platlib dir for compatibility with ubuntu 22.04's ancient meson version
…atures are disabled
946bf68
to
f5adeb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Looks like it just needs the #include
s to be rearranged to pass the format check (or the formatter needs to be run).
For the components which are stubbed out but disabled (e.g. generating docs, java, etc.) could you pop an issue to track them?
Add support for building LCM with Meson and add workflow tests for LCM built with Meson. Supports LCM core features. Meson support will make it easier to use LCM as a subproject in other Meson projects.
Does not support building Python, Java, and Lua modules from Meson for now (moved to new branch to simplify pull request).