Skip to content

build: use cmake build system in fastjet and fastjet-contrib #340

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

Draft
wants to merge 83 commits into
base: main
Choose a base branch
from

Conversation

lgray
Copy link
Collaborator

@lgray lgray commented Apr 7, 2025

This branch will be where we figure out pip install . and cibuildwheel for scikit-hep/fastjet using the in-progress cmake build branches for fastjet/siscone/fastjet-contrib.

I need to get the fastjet-contrib edits into a github repository so we can submodule it correctly.
Right now I have it working locally from the fastjet-contrib svn repository + patches.

At least on my laptop I can get the scikit-hep/fastjet extension compiling and linking.
It doesn't yet function at runtime, but it's only a matter of time.

I'll send some further notifications when it's ready for a more serious look.

One thing we need to solve:

  • MACOSX_DEPLOYMENT_TARGET=11.0 (instead of 14.0/13.0 which is what gets us all green right now)

@matthewfeickert @henryiii

@lgray lgray marked this pull request as draft April 7, 2025 18:49
@lgray lgray changed the title build(WIP): use cmake build system in fastjet and fastjet-contrib build: use cmake build system in fastjet and fastjet-contrib Apr 7, 2025
@lgray
Copy link
Collaborator Author

lgray commented Apr 8, 2025

OK - the present setup builds on my mac using the following commands:

git clone [email protected]:scikit-hep/fastjet.git -b cmake-build-work --recursive
cd fastjet
mkdir build
cmake -S . -B build -DCMAKE_BUILD_TYPE="Release" -DFASTJET_ENABLE_PYTHON=ON -DFASTJET_ENABLE_CGAL=ON -DFASTJET_PYTHON_PACKAGE_NAME=fastjet_cxx
cmake --build build --clean-first --parallel
cd build
python -c 'import _ext; print(_ext)'

Depending on your circumstances you may need to specify pybind11_DIR or turn off CGAL (I have it in from conda).

I'm gonna leave it at that for now y'all can feel free to poke around on the PR with additions, etc.

@lgray
Copy link
Collaborator Author

lgray commented Apr 8, 2025

OK - cool so now it's at least compiling (but not finishing the install!) with scikit-build-core. CGAL is on in all the cases, installed via system libs.

The errors I'm seeing don't make a lot of sense, so would now definitely appreciate help in getting the CI green again :D

@lgray
Copy link
Collaborator Author

lgray commented Apr 8, 2025

hmmm it would be nice to be able to browse the packages available in manylinux online.

anyway leaving it here for now. more than decent progress.

@lgray
Copy link
Collaborator Author

lgray commented Apr 8, 2025

@henryiii

git clone [email protected]:scikit-hep/fastjet.git -b cmake-build-work --recursive
cd fastjet
pip install . -vv
python -c 'import fastjet; print(fastjet)'

@lgray
Copy link
Collaborator Author

lgray commented Apr 8, 2025

I'm also not sure what's up with this metadata error in the CI install. This doesn't happen locally.

@lgray
Copy link
Collaborator Author

lgray commented Apr 9, 2025

Wheels Built

@lgray
Copy link
Collaborator Author

lgray commented Apr 9, 2025

Now that that particularly angry yak is shaved. Let's clean this up and ship it. :-) (after the fastjet/siscone/fastjet-contrib releases, etc.)

@lgray lgray closed this Apr 10, 2025
@lgray lgray reopened this Apr 10, 2025
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.

2 participants