diff --git a/src/user-guide/installing-workflows.rst b/src/user-guide/installing-workflows.rst index a3464f1882..601bd5cae2 100644 --- a/src/user-guide/installing-workflows.rst +++ b/src/user-guide/installing-workflows.rst @@ -398,6 +398,12 @@ The run directory now looks as follows: │ └── -reinstall.log └── .service +.. note:: + + If your workflow needs to create or install scripts or executables at runtime + and you don't want Cylc to delete them on re-installation, you can use + ``bin`` and ``lib/python`` directories in the :ref:` workflow share directory `. + Expected Errors --------------- diff --git a/src/user-guide/writing-workflows/configuration.rst b/src/user-guide/writing-workflows/configuration.rst index 4ce12c366a..16bbf4a39a 100644 --- a/src/user-guide/writing-workflows/configuration.rst +++ b/src/user-guide/writing-workflows/configuration.rst @@ -55,6 +55,12 @@ Other files and folders may be placed in the :term:`source directory` too: documentation, configuration files, etc. When the workflow is :ref:`installed ` these will be copied over to the :term:`run directory`. +.. note:: + + If your workflow needs to create or install scripts or executables at runtime + and you don't want Cylc to delete them on re-installation, you can use + equivalent directories in the :ref:`workflow_share_directories`. + .. _SyntaxHighlighting: diff --git a/src/user-guide/writing-workflows/runtime.rst b/src/user-guide/writing-workflows/runtime.rst index 6a6eeed2f2..a23c94b642 100644 --- a/src/user-guide/writing-workflows/runtime.rst +++ b/src/user-guide/writing-workflows/runtime.rst @@ -306,6 +306,8 @@ exported to subshells: # relative to the workflow work directory +.. _workflow_share_directories: + Workflow Share Directories ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -317,6 +319,22 @@ output files are typically held in cycle point sub-directories of this. The top level share directory location can be changed, e.g. to a large data area, by global config settings under :cylc:conf:`global.cylc[install][symlink dirs]`. +If your workflow creates or installs executables or Python libraries +as it is running, these can be placed in: + +* ``share/bin/`` - for executables. This location is automatically added to ``PATH`` + (before the top-level ``bin/`` in the run dir). +* ``share/lib/python/`` - for Python modules. This location is automatically added + to ``PYTHONPATH`` (before the top-level ``lib/python/`` in the run dir). + +.. note:: + + Cylc will not create these folders. + +.. seealso:: + + :ref:`Top level "bin/" and "lib/python/" directories `. + Task Work Directories ^^^^^^^^^^^^^^^^^^^^^