This is the python wrapper around trm-subs and some other trm c++ software.
This is the update to many of the repositories found here. The code will create a drop in replacement via the form from trm_py import trm_<name>
or from trm_py.trm_<name> import <name>
, import trm_py
will also be supported with tool access via trm_py.<name>.<tool>
.
This code will be installable via pip install trm-py
from PyPi (and potentially via Conda). This code will not require additional C++ libaray installations as it will come formost as a bdist
for most common platforms and a sdist
to support build and installation on uncommon platforms.
Until further notice this is a WIP and should not be considered usable for scientific use.
By necessity the CPP subdirectorys are included to build the python wheel against. This makes this the aconvenient place to do a full CPP build for those looking to access trm-subs and associated libs via cpp code. To build (and install) all the TRM cpp libs directly:
TODO: Test this on multiplatform builds:
- Decide on your PLPLOT install method (see cmake_common/plplot_install.cmake)
- If PLPLOT is installed then
0
and set path (recommended for linux) - Build from source during the install select
1
,2
, or3
depending on desired build location and set path if required - Use homebrew install
4
(recommended for mac) (brew install plplot
)
- If PLPLOT is installed then
- Install/activate the python envronment using poetry (required for conan)
cd src
, Move to the source directoryconan install . --build=missing
, Install PCRE2, llvm-openmp, and SOFA from conanconan profile detect --force
, Set the conan build profilecmake --preset conan-release -DPLPLOT_BUILD_TYPE='0,1,2,3,or 4' -DPLPLOT_USE_PATH='path/to/plplot/install'
, use the PLPLOT build choice and use the PLPLOT path if neededcmake --build --preset conan-release
OPTIONAL: Install to system, else programs are in src/build/release
<sudo> cmake --install build/Release
- (Optional): use
otool -l <exe or lib> | grep RPATH -A2
to ensure that the programs and libraries have linked correctly