anisotropy/INSTALL.rst

96 lines
2.3 KiB
ReStructuredText
Raw Normal View History

Installation
============
Base package
------------
Via virtual environment (recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A recommended way is to install a package in the virtual environment.
2021-08-25 21:48:02 +05:00
Just create and activate python virtual environment:
.. code-block:: bash
$ python -m venv env
$ source env/bin/activate
and run pip inside (upgrade pip if you need):
.. code-block:: bash
(env) $ python -m pip install --upgrade pip
(env) $ python -m pip install .
User installation
~~~~~~~~~~~~~~~~~
Same but without the virtual environment:
.. code-block:: bash
$ python -m pip install --upgrade pip
$ python -m pip install .
2021-08-25 21:48:02 +05:00
External applications
---------------------
Anisotropy project requires ``Salome`` executable and ``OpenFOAM`` ``bashrc`` script be in ``PATH``.
You can choose your way by following one of the next step.
2021-08-25 21:48:02 +05:00
* You can use next commands directly (each time):
2021-08-25 21:48:02 +05:00
.. code-block:: bash
$ export PATH="${HOME}/PATH/TO/SALOME/DIRECTORY:${PATH}"
2021-08-25 21:48:02 +05:00
$ source "${HOME}/PATH/TO/OPENFOAM/DIRECTORY/etc/bashrc"
* Or modify file ``anisotropy/config/bashrc`` in project directory (example, ``bash``)
2021-08-25 21:48:02 +05:00
.. code-block:: bash
export PATH="${HOME}/programs/salome/SALOME-9.7.0-MPI:${PATH}"
2021-08-25 21:48:02 +05:00
source "${HOME}/programs/OpenFOAM/OpenFOAM-v2012/etc/bashrc"
and source it (each time):
.. code-block:: bash
$ source anisotropy/config/bashrc
2021-08-25 21:48:02 +05:00
* The best way is to modify ``anisotropy/config/bashrc`` like in step 2 and append it to the virtual environment ``activate`` script:
2021-08-25 21:48:02 +05:00
.. code-block:: bash
$ cat anisotropy/config/bashrc | tee -a env/bin/activate
2021-08-25 21:48:02 +05:00
So next time you just need to ``source env/bin/activate`` and you completely ready.
* You should add paths to ``~/.bashrc`` (``bash``) if you installed ``anisotropy`` in user path:
.. code-block:: bash
$ cat anisotropy/config/bashrc | tee -a ~/.bashrc
2021-08-25 21:48:02 +05:00
Building documentaion
---------------------
For building a documentaion you should install a documentaion requirements:
2021-08-25 21:48:02 +05:00
.. code-block:: bash
$ source env/bin/activate
(env) $ python -m pip install "../anisotropy[documentaion]"
Then just run ``make`` with your best format option:
.. code-block:: bash
2021-08-25 21:48:02 +05:00
(env) $ cd docs
(env) $ make html
For more information about options you can read ``Sphinx`` documentaion or run ``make help``.