From 3451b677f11b804800c4171809def238d321ddab Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Tue, 23 Jul 2019 16:55:47 +0200 Subject: [PATCH] Add documentation about how to use dune-codegen in an offline environment --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 8896b121..5856f351 100644 --- a/README.md +++ b/README.md @@ -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 -- GitLab