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

Use CMake and cibuildwheel, take 2 #3

Merged
merged 33 commits into from
Sep 1, 2024
Merged

Use CMake and cibuildwheel, take 2 #3

merged 33 commits into from
Sep 1, 2024

Conversation

JCGoran
Copy link
Owner

@JCGoran JCGoran commented Jul 28, 2024

After some trial and error, I think I managed to get COFFE to work seamlessly on both Linux and MacOS (both arm64 and x86_64) using CMake as the build system.
Refer to the README to see how it works, but the short version for how to build COFFE (the Python version at least) on MacOS is:

  • make a Python venv and activate it
  • then either (the two approaches can be mixed and matched, but I don't recommend it):
    • install Conan via pip install conan and install the third-party dependencies conan profile detect --force && conan install . --output-folder=_build --build=missing
    • install the third-part dependencies via Homebrew brew install fftw gsl libconfig
  • finally, install the "other" dependencies with bash scripts/install_other.sh cuba class (sudo may be needed since it's writing to /opt)
  • install COFFE with pip install .. Optional dependencies (for testing, docs, etc.) can be installed with pip install '.[all]' (note the quotes around, you need them)

For testing, you can do python -m pytest -vvv tests/ (note that this may take some time to run).

To make a Python version of COFFE you can send to others, you can do:

  • make a Python venv and activate it
  • pip install cibuildwheel
  • cibuildwheel --platform macos. If it complains about versioning, prepend SETUPTOOLS_SCM_PRETEND_VERSION=[SOME VERSION], where [SOME VERSION] should be something like 3.0.2

I've also setup a CI that should build all of the wheels, that can then be uploaded.

Click here to download all (Python 3.8-3.12) MacOS wheels

@fsorrenti let me know if this works on your machine, or if you encounter any problems/need any clarifications.

@fsorrenti
Copy link
Collaborator

Hi @JCGoran! I didn't get which instruction i Should follow, since in this thresd there are info different from readme.md

@JCGoran
Copy link
Owner Author

JCGoran commented Jul 28, 2024

Yes, the info is different because it's on another branch (the one this PR is tracking), have a look at https://github.com/JCGoran/coffe/blob/jelic/feature/cmake/README.md

@JCGoran JCGoran merged commit 7cb95f0 into master Sep 1, 2024
4 checks passed
@JCGoran JCGoran mentioned this pull request Sep 1, 2024
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