Skip to content
Snippets Groups Projects
Commit a08f63e1 authored by Hkorb's avatar Hkorb
Browse files

adds support for usage of pip option config settings

parent 68dfc4c8
No related branches found
No related tags found
1 merge request!170Kernel templetization and efficiency improvements
......@@ -5,4 +5,5 @@ requires = [
"cmake",
"ninja; platform_system!='Windows'"
]
build-backend = "setuptools.build_meta"
\ No newline at end of file
build-backend = "setup_builder"
backend-path = ["utilities"]
\ No newline at end of file
import inspect
import sys
from pathlib import Path
import skbuild
import setuptools
"""
Install python wrapper of virtual fluids
install via python:
python setup.py install build_ext
set CMAKE Flags via -DBUILD_VF_GPU:BOOL=1
CMAKE flags have to be separated by --
example: python setup.py install build_ext -- VBUILD_VF_CPU:BOOL=ON
or install via pip:
pip install -e .
set CMAKE Flags via --config-settings -DBUILD_VF_GPU=1
......@@ -29,6 +29,9 @@ init_file.write_text(init_py)
name_of_build_dir = "build"
build_dir = (top_dir/name_of_build_dir).mkdir(exist_ok=True)
extra_args = []
if("cmake_args" in locals()):
extra_args.extend([f"{k}={v}" for k,v in locals()["cmake_args"].items()])
cmake_args = [
f"-DPython3_ROOT_DIR={Path(sys.prefix)}",
......@@ -37,7 +40,7 @@ cmake_args = [
"-DBUILD_VF_DOUBLE_ACCURACY=OFF",
"-DBUILD_VF_UNIT_TESTS:BOOL=OFF",
"-DBUILD_WARNINGS_AS_ERRORS=OFF",
]
] + extra_args
skbuild.setup(
name="pyfluids",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment