Coder Social home page Coder Social logo

dh-venv's Introduction

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`

dh-venv's People

Contributors

guilhem avatar ygbourhis avatar

Stargazers

Jürgen Hermann avatar Michael Hood avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

ygbourhis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.