-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Charlton, Scott R edited this page Feb 21, 2023
·
4 revisions
Welcome to the phreeqcrm wiki!
Instructions for building Python bindings using CMake and SWIG:
$ cd phreeqcrm
$ git remote add scharlton2 [email protected]:scharlton2/phreeqcrm.git
$ git fetch --all
$ git switch main-swig
$ mkdir _swig
$ cd _swig
$ cmake .. -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/INSTALL
$ cmake --build . --config Release -j5
$ cd swig
$ python advection_cpp.py
On Windows pwsh:
> cd phreeqcrm
> git remote add scharlton2 git@github.com:scharlton2/phreeqcrm.git
> git fetch --all
> git switch main-swig
> mkdir _swig
> cd _swig
> cmake .. -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/INSTALL
> cmake --build . --config Release -j5
> cd swig
> $env:PYTHONPATH="$(pwd)\Release"
> python advection_cpp.py
On Windows cmd:
> cd phreeqcrm
> git remote add scharlton2 git@github.com:scharlton2/phreeqcrm.git
> git fetch --all
> git switch main-swig
> mkdir _swig
> cd _swig
> cmake .. -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/INSTALL
> cmake --build . --config Release -j5
> cd swig
> set PYTHONPATH=%CD%\Release
> python advection_cpp.py