Skip to content
Snippets Groups Projects
Commit b4428bb9 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[!340] Add documentation about how to use dune-codegen in an offline environment

Merge branch 'feature/offline-usage' into 'master'

ref:extensions/dune-codegen @rhess Could you try this at some point.

The docs are currently missing how a local package index can be relocated into
a completely isolated environment, but I want to wait until the [devpi
website] is up again to read up on that.

This fixes [#127].

See merge request [extensions/dune-codegen!340]

  [devpi website]: https://doc.devpi.net/
  [#127]: gitlab.dune-project.org/NoneNone/issues/127
  [extensions/dune-codegen!340]: gitlab.dune-project.org/extensions/dune-codegen/merge_requests/340


Closes #127
parents 3d6356e3 3451b677
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,25 @@ ctest
Note that this takes quite a while.
## Building and Running dune-codegen in an offline environment
dune-codegen relies on installing Python packages into self-contained environments
during its configuration and build process. In order to do this in an offline
environment, we recommend using the tool `devpi`. One of its use cases is to provide
a local mirror for the Python package index. A quickstart tutorial for this use case
is available [5]. It boils down to the following:
* Installing the `devpi-server` package through your favorite method
* Setting up a local server with `devpi-server --init`
* Making sure it is running in the background (explicitly with `devpi-server --start/stop` or by configuring a systemd service.
* Have the environment variable `PIP_INDEX_URL` to its index, e.g. by adding this line to your `~/.bashrc` (where `http://localhost:3141` might differ depending on your devpi configuration):
```
export PIP_INDEX_URL=http://localhost:3141/root/pypi/+simple/
```
At first installation, the locally mirrored package index will access PyPI.
Later on, it will install packages from its local cache.
## Links
[0]: https://git-lfs.github.com/
......@@ -112,3 +131,4 @@ Note that this takes quite a while.
[2]: https://gitlab.dune-project.org/quality/dune-testtools
[3]: http://isl.gforge.inria.fr/
[4]: https://www.dune-project.org/doc/installation/
[5]: https://github.com/devpi/devpi/blob/master/doc/quickstart-pypimirror.rst
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment