Skip to content

debhelper add-on for packaging software written in Python in a venv/virtualenv

Notifications You must be signed in to change notification settings

guilhem/dh-venv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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_PIP_INSTALL_REQUIREMENTS options to pip when installing requirements values,comma,separated
DH_VENV_PIP_INSTALL options to pip when installing package values,comma,separated
DH_VENV_ROOT_PATH Root path for destination application single_word ``/usr/share/python`

About

debhelper add-on for packaging software written in Python in a venv/virtualenv

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages