Skip to content

Build development virtualenv

Kristian Larsson requested to merge 175-dev-pyvenv into master

This changes the Python virtualenv activation at build time (in the Docker image build process). We start by looking for a virtualenv in pyvenv-dev/ and if found, will activate it. If pyvenv-dev/ is not present, then we will look in pyvenv/ and if found, activate it.

We also automatically build pyvenv-dev/ from src/requirements-dev.txt, if it exists. After we have built the package (using the pyvenv(-dev)) we remove pyvenv-dev, since we want to keep down the size of the output container image.

It is a common practice to define a requirements.txt for the run time dependencies and a second requirements-dev.txt that lists build time dependencies. Linting tools would be a typical example of a build time dependency that is simply not needed at run time.

requirements-dev.txt should include requirements.txt as to ensure the -dev venv is a superset of the runtime pyvenv.

Closes #175 (closed)

Merge request reports