Skip to content

Commit

Permalink
Merge pull request #753 from mkstoyanov/improve_pip_options
Browse files Browse the repository at this point in the history
Improve pip options
  • Loading branch information
mkstoyanov authored Feb 15, 2024
2 parents 6ff2a0a + 92778cf commit 024ff74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Config/CMakeIncludes/sanity_check_and_xsdk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ endif()

# get extra options from the ENV variables (pip-installer)
if (SKBUILD)
if ("$ENV{Tasmanian_ENABLE_RECOMMENDED}" STREQUAL "OFF")
set(Tasmanian_ENABLE_RECOMMENDED OFF)
endif()
if (NOT "$ENV{Tasmanian_ENABLE_BLAS}" STREQUAL "")
set(Tasmanian_ENABLE_BLAS ON)
set(BLAS_LIBRARIES "$ENV{Tasmanian_ENABLE_BLAS}")
Expand Down
5 changes: 4 additions & 1 deletion Doxygen/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,15 @@ Tasmanian is included in the Python Pip index: [https://pypi.org/project/Tasmani

The Tasmanian module is not a regular Python-only project but a wrapper around the C++ libraries, note the following:
* The compiled binaries are cached by pip and `--no-cache-dir` option must be used to change the options.
* Pip versions prior to 1.10 require that dependencies are installed manually.
* Only user installations are supported, installation for all users is possible with CMake but not Pip.
* Python virtual environments are supported, as well as Linux, Mac and Windows operating systems.
* By default, Tasmanian will install with `Tasmanian_ENABLE_RECOMMENDED=ON` which will safe-auto-enable BLAS and OpenMP
* environment variable (see below) can be used to disable the recommended options and switch to manual enable/disable
* The Pip installer will accept Tasmanian options specified in the environment variables:
```
Environment Option will translate to CMake Options
export Tasmanian_ENABLE_RECOMMENDED=OFF -D Tasmanian_ENABLE_RECOMMENDED=OFF
export Tasmanian_ENABLE_BLAS=<blas-lapack-libs> -D Tasmanian_ENABLE_BLAS=ON
-D BLAS_LIBRARIES=<blas-lapack-libs>
-D LAPACK_LIBRARIES=<blas-lapack-libs>
Expand Down
2 changes: 1 addition & 1 deletion InterfacePython/PipInstaller/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
# call the actual package setup command
setup(
name='Tasmanian',
version='8.0',
version='8.0fix1',
author='Miroslav Stoyanov',
author_email='stoyanovmk@ornl.gov',
description='UQ library for sparse grids, optimization and Bayesian inference',
Expand Down

0 comments on commit 024ff74

Please sign in to comment.