Skip to content
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

Add PEP-517 Support #521

Merged
merged 19 commits into from
Aug 5, 2024
Merged

Add PEP-517 Support #521

merged 19 commits into from
Aug 5, 2024

Conversation

nosracd
Copy link
Contributor

@nosracd nosracd commented Jul 19, 2024

This PR adds a pyproject.yaml which uses the scikit-build-core backend to build LCM and package it into a wheel. This means that Python users can pip install . to build LCM from source and install it. It also adds a CI job to build a plethora of wheels via cibuildwheel for linux and macOS, both aarch64 and x86_64. This is necessary to resolve #512.

Other changes include:

  • Stuff links against the static LCM library rather than the shared library (this generally makes wheels more portable and helps pass auditwheel)
  • The installation location for the Python module is changed during pip builds.
  • Miscellaneous changes to how Python is discovered by Cmake. On unix it looks for Python3 in particular. Also the Development.Module component is looked-for in particular rather than just the Development component.
  • A series of run_* functions are added to the python module (e.g. run_logplayer_gui). The python package creates a corresponding script which gets put in the main bin/ directory and calls that function. Then that function calls the corresponding LCM script. These shims allow LCM scripts to be on the main path for the Python user.

@nosracd nosracd force-pushed the feature/wheels branch 3 times, most recently from 5d61910 to 251423f Compare July 28, 2024 14:19
want it to actually compile stuff
want something top-level
use all versions of scikit-build-core
bump python required to build wheel
    scikit_build_core not available on older versions
set -j4
don't include .pc files in wheel
pull windows out of the matrix into its own job

specify msys2 shell
latest version has fixes for EOL centOS mirrors
@nosracd nosracd force-pushed the feature/wheels branch 2 times, most recently from c55ba44 to 649b8ab Compare July 29, 2024 12:43
local venv and macOS stuff
bump cibuildwheel
    need a version that has a version of manylinux with past EOL centOS mirrors

give up on java on muslinux
    cmake can't find javah
@nosracd nosracd requested a review from ihilt August 1, 2024 20:20
@ihilt ihilt merged commit f18f8a6 into lcm-proj:master Aug 5, 2024
49 checks passed
@ihilt ihilt deleted the feature/wheels branch August 5, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload lcm-python for Python 3.11
2 participants