Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.75 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.75 KB

Goal

Packaging a python app can be really painful.
You have to package your app, test it with lib already packaged and package yourself any python lib you want (and pray for not breaking something).

On the other side, dev love to use vendoring like virtualenv (python 2) or venv (python 3.3+).

Unite them all!

Install

Ubuntu

Repository

Package

sudo apt-get update; sudo apt-get install dh-venv

Usage

rules

In your rules file, just add this for a simple package (who works):

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --buildsystem python_venv

Package

By default, it will create a virtualenv in /usr/share/python with package source name (find in control file).

Options

Some global variables can be used to customize / extend dh-venv:

Varible Action Format Default Value
DH_VENV_NAME Virtualenv name single_word package source name
DH_VENV_PKG Package where virtualenv will be put single_word package source name
DH_VENV_REQUIREMENT_FILE requirement file to install single_word requirements.txt
DH_VENV_CREATE options to pass at creation of virtualenv value,comma,separated --no-site-packages
DH_VENV_ROOT_PATH Root path for destination application single_word ``/usr/share/python`