Skip to content

Commit

Permalink
Simplify local build on MacOS (#5)
Browse files Browse the repository at this point in the history
Also updated installation instructions
  • Loading branch information
JCGoran authored Oct 10, 2024
1 parent 7a56ea1 commit 6885e7c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ If you would like to install the development version, you will need to first hav
Then clone this repository:

```sh
git clone https://github.com/JCGoran/coffe
git clone --recurse-submodules https://github.com/JCGoran/coffe
```

then change directory to it:
Expand Down Expand Up @@ -134,12 +134,6 @@ If you would additionally like to install all of the various tools for testing,
pip install '.[all]'
```

**NOTE**: if using Conan to install some of the dependencies, you will need to specify the toolchain file using:

```sh
pip install '.[all]' --config-settings=cmake.define.CMAKE_TOOLCHAIN_FILE="_build/conan_toolchain.cmake"
```

## Documentation

The documentation for the latest version is available [here](https://jcgoran.github.io/coffe/).
Expand Down Expand Up @@ -247,7 +241,15 @@ cibuildwheel --platform macos

The wheels will then be available in the `wheelhouse` subdirectory, and can then be uploaded to PyPI.

**IMPORTANT NOTE**: if you installed GSL, FFTW, or libconfig via Brew, make sure to unlink them first using:
**IMPORTANT NOTE**: when building a wheel using `cibuildwheel`, the version of COFFE in the output can be surprising; to avoid any issues, it is best to specify the explicit version using:

```sh
export SETUPTOOLS_SCM_PRETEND_VERSION=[VERSION]
```

where `[VERSION]` is the version number you want to tag this version of COFFE (for instance, `3.0.2`).

**IMPORTANT NOTE 2**: if you installed GSL, FFTW, or libconfig via Brew, make sure to unlink them first using:

```sh
brew unlink gsl fftw libconfig
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,12 @@ COFFE_ENABLE_PYTHON = "ON"
COFFE_ENABLE_MATHOPTS = "ON"
COFFE_ENABLE_CUBA = "ON"

[[tool.scikit-build.overrides]]
if.platform-system = "darwin"
cmake.define.CMAKE_TOOLCHAIN_FILE="_build/conan_toolchain.cmake"
cmake.define.COFFE_ENABLE_CLASS = "ON"
cmake.define.COFFE_ENABLE_PYTHON = "ON"
cmake.define.COFFE_ENABLE_MATHOPTS = "ON"
cmake.define.COFFE_ENABLE_CUBA = "ON"

[tool.setuptools_scm]

0 comments on commit 6885e7c

Please sign in to comment.