Skip to content
Snippets Groups Projects
Commit 86bdefaf authored by Lars Bilke's avatar Lars Bilke
Browse files

Merge branch 'wheel-install' into 'master'

[cmake,web] Don't overwrite `--preset wheel` in usage instructions.

See merge request ogs/ogs!5114
parents bb92bc6b 47afdd55
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,14 @@ if(NOT OGS_BUILD_WHEEL) ...@@ -8,6 +8,14 @@ if(NOT OGS_BUILD_WHEEL)
set(_py_build_location "${PROJECT_BINARY_DIR}/site-packages/ogs") set(_py_build_location "${PROJECT_BINARY_DIR}/site-packages/ogs")
endif() endif()
if(SKBUILD AND NOT OGS_BUILD_WHEEL)
message(
FATAL_ERROR
"Invalid configuration! Don't use --config-settings=cmake.args!"
"Use --config-settings=cmake.define instead or supply '--preset wheel` to cmake.args"
)
endif()
add_subdirectory(ogs) add_subdirectory(ogs)
add_subdirectory(ogs.simulator) add_subdirectory(ogs.simulator)
add_subdirectory(ogs.mesh) add_subdirectory(ogs.mesh)
......
...@@ -7,11 +7,7 @@ string(REPLACE ";" "\n" _config_content "${_config_content}") ...@@ -7,11 +7,7 @@ string(REPLACE ";" "\n" _config_content "${_config_content}")
set(_config_file ${PROJECT_BINARY_DIR}/site-packages/ogs/config.py) set(_config_file ${PROJECT_BINARY_DIR}/site-packages/ogs/config.py)
file(CONFIGURE OUTPUT ${_config_file} CONTENT "${_config_content}") file(CONFIGURE OUTPUT ${_config_file} CONTENT "${_config_content}")
if(OGS_BUILD_WHEEL) install(FILES ${_config_file} DESTINATION ${_py_install_location})
install(FILES ${_config_file} DESTINATION ${SKBUILD_PLATLIB_DIR}/ogs)
else()
install(FILES ${_config_file} DESTINATION ${_py_install_location})
endif()
if(OGS_BUILD_WHEEL) if(OGS_BUILD_WHEEL)
return() return()
......
...@@ -53,9 +53,7 @@ pip install -v .[test] ...@@ -53,9 +53,7 @@ pip install -v .[test]
Successfully installed ogs-6.4.2.dev1207 Successfully installed ogs-6.4.2.dev1207
# To build with additional CMake arguments, e.g.: # To build with additional CMake arguments, e.g.:
CMAKE_ARGS="-DOGS_BUILD_PROCESSES=SteadyStateDiffusion" pip install -v .[test] pip install -v .[test] --config-settings=cmake.define.OGS_BUILD_PROCESSES=SteadyStateDiffusion"
# OR
pip install -v .[test] --config-settings=cmake.args="-DOGS_BUILD_PROCESSES=SteadyStateDiffusion"
``` ```
The `pip install`-step starts a new CMake-based ogs build in `_skbuild`-subdirectory (inside the source code) using the `wheel`-preset. When the CMake build is done it installs the wheel into the activated virtual environment and you can interact with it. The `pip install`-step starts a new CMake-based ogs build in `_skbuild`-subdirectory (inside the source code) using the `wheel`-preset. When the CMake build is done it installs the wheel into the activated virtual environment and you can interact with it.
......
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