Skip to content

Commit

Permalink
Fixes for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Sep 1, 2024
1 parent ad1dcbf commit 7c573af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ if(COFFE_ENABLE_PYTHON)
# need to use this annoying hack. Note that this does not guarantee that the
# Python executable is the one from the venv, but at least it finds the one
# compatible with all of the packages from the venv
if(NOT COFFE_PYTHON_MINOR_VERSION)
execute_process(
COMMAND python -c "import sys;print(sys.version_info.minor)"
OUTPUT_VARIABLE COFFE_PYTHON_MINOR_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
find_package(
Python "3.${COFFE_PYTHON_MINOR_VERSION}" EXACT
COMPONENTS Interpreter Development.Module
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pip install conan
Then, generate a profile:

```sh
conan profile detect
conan profile detect --force
```

Finally, install all of the dependencies in the `_build` directory:
Expand Down Expand Up @@ -134,6 +134,12 @@ 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
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ verbose = true
version = ">=3.15.0"

[tool.scikit-build.cmake.define]
# on MacOS, this probably doesn't work;
# to make a wheel, just use `cibuildwheel --platform macos`
COFFE_ENABLE_CLASS = "ON"
COFFE_ENABLE_PYTHON = "ON"
COFFE_ENABLE_MATHOPTS = "ON"
COFFE_ENABLE_CUBA="ON"
COFFE_ENABLE_CUBA = "ON"

[tool.setuptools_scm]

0 comments on commit 7c573af

Please sign in to comment.