What is dh-virtualenv¶
dh-virtualenv is a tool that aims to combine Debian packaging with
self-contained virtualenv based Python deployments. To do this, the
package extends debhelper’s sequence by providing a new command in sequence,
dh_virtualenv, which effectively replaces following commands
from the sequence:
In the sequence the
dh_virtualenv is inserted right after
Following list contains most notable changes by version. For full list consult the git history of the project.
- Backwards incompatible Change the default install root to
/opt/venvs. This is due to the old installation root (
/usr/share/python) clashing with Debian provided Python utilities. To maintain the old install location, use
DH_VIRTUALENV_INSTALL_ROOTand point it to
- Backwards incompatible By default, do not run setup.py test
upon building. The
--no-testflag has no longer has any effect. To get the old behaviour, use the
- Backwards incompatible Buildsystem: Move files into build folder in install step instead of build step. Thanks to Ludwig Hähne for the patch!
--pypi-urlin favour of
- Support upgrading pip to the latest release with
- Buildsystem: Add support for
DH_UPGRADE_WHEEL. Thanks to Kris Kvilekval for the implementation!
- Buildsystem: Add support for custom requirements file location
DH_REQUIREMENTS_FILEand for custom
pipcommand line arguments using
DH_PIP_EXTRA_ARGS. Thanks to Einar Forselv for implementing!
- Fixing shebangs now supports multiple interpreters. Thanks Javier Santacruz!
- Allow a custom pip executable via
--pip-toolflag. Thanks Anthony Sottile for the implementation!
- Fix handling of shebang lines for cases where interpreter was wrapped in quotes. Thanks to Kamil Niechajewicz for fixing!
- Support extra arguments to be passed at virtualenv using
--extra-virtualenv-arg. Thanks to Julien Duponchelle for the fix.
- Allow passing explicit filename for requirements.txt using
--requirementsoption. Thanks to Eric Larson for implementing!
- Ensure that venv is configured before starting any daemons. Thanks to Chris Lamb for fixing this!
- Make sure fix_activate_path updates all activate scripts. Thanks to walrusVision for fixing this!
- Backwards incompatible Fix installation using the built-in
virtual environment on 3.4. This might break installation on Python
versions prior to 3.4 when using
--builtin-venvflag. Thanks to Elonen for fixing!
DH_VIRTUALENV_INSTALL_ROOTin build system. Thanks to Ludwig Hähne for implementing!
- Allow overriding virtualenv arguments by using the
DH_VIRTUALENV_ARGUMENTSenvironment variable when using the build system. Thanks to Ludwig Hähne for implementing!
- Add option to skip installation of the actual project. In other
--skip-installinstalls only the dependencies of the project found in requirements.txt. Thanks to Phillip O’Donnell for implementing!
- Support custom installation suffix instead of the package name via
--install-suffix. Thanks to Phillip O’Donnell for implementing!
- Support for running triggers upon host interpreter update. This new feature makes it possible to upgrade the host Python interpreter and avoid breakage of all the virtualenvs installed with dh-virtualenv. For usage, see the the Tutorial. Huge thanks to Jürgen Hermann for implementing this long wanted feature!
- Add support for the built-in
venvmodule. Thanks to Petri Lehtinen!
- Allow custom
pipflags to be passed via the
--extra-pip-argflag. Thanks to @labeneator for the feature.
- Backwards incompatible Support running tests. This change
breaks builds that use distutils. For those cases a flag
--no-testneeds to be passed.
- Add tutorial to documentation
- Don’t crash on debbuild parameters
- Support custom source directory (debhelper’s flag
First public release of dh-virtualenv