All Projects → spotify → Dh Virtualenv

spotify / Dh Virtualenv

Licence: gpl-2.0
Python virtualenvs in Debian packages

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
perl
6916 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Dh Virtualenv

debianized-jupyterhub
📦 ♃ Debian packaging of JupyterHub, a multi-user server for Jupyter notebooks
Stars: ✭ 28 (-98.14%)
Mutual labels:  debian-packages, dh-virtualenv, omnibus-packages
debianopt-repo
Additional debian repository for awesome open-source projects.
Stars: ✭ 47 (-96.87%)
Mutual labels:  debian, debian-packages
docker-debian-repository
A local repository for publishing deb files for use with apt.
Stars: ✭ 49 (-96.74%)
Mutual labels:  debian, debian-packages
intellij-idea-community
Unofficial .deb packages of IntelliJ IDEA Community Edition. This is a mirror of
Stars: ✭ 32 (-97.87%)
Mutual labels:  debian, debian-packages
maldetect
Debian packaging of Linux Malware Detect (https://github.com/rfxn/linux-malware-detect)
Stars: ✭ 48 (-96.81%)
Mutual labels:  debian, debian-packages
debian-packaging
Create Debian packages of non-free, closed-source and other software.
Stars: ✭ 19 (-98.74%)
Mutual labels:  debian, debian-packages
wakemeops
A Debian repository for portable applications
Stars: ✭ 54 (-96.41%)
Mutual labels:  debian, debian-packages
Ubuntu-Launchpad
The Ubuntu version of Apple's/MacOS Launchpad application
Stars: ✭ 21 (-98.6%)
Mutual labels:  debian, debian-packages
php-deb-packager
A PHP library to generate `.deb` packages (Software distribution)
Stars: ✭ 54 (-96.41%)
Mutual labels:  debian, debian-packages
intellij-idea-ultimate
Unofficial .deb packages of IntelliJ IDEA Ultimate Edition. This is a mirror of https://gitlab.com/mmk2410/intellij-idea-ultimate
Stars: ✭ 16 (-98.94%)
Mutual labels:  debian, debian-packages
Mailserver
⚠️ UNMAINTAINED - Simple and full-featured mail server using Docker
Stars: ✭ 1,267 (-15.76%)
Mutual labels:  debian
Dockstarter
DockSTARTer helps you get started with home server apps running in Docker.
Stars: ✭ 1,265 (-15.89%)
Mutual labels:  debian
Vagrant Box Templates
Stars: ✭ 100 (-93.35%)
Mutual labels:  debian
Ansible Postfix
Ansible role to set up postfix in Debian-like systems
Stars: ✭ 102 (-93.22%)
Mutual labels:  debian
I3 Config
i3wm configuration files
Stars: ✭ 81 (-94.61%)
Mutual labels:  debian
Qv2ray
⭐ Linux / Windows / macOS 跨平台 V2Ray 客户端 | 支持 VMess / VLESS / SSR / Trojan / Trojan-Go / NaiveProxy / HTTP / HTTPS / SOCKS5 | 使用 C++ / Qt 开发 | 可拓展插件式设计 ⭐
Stars: ✭ 12,886 (+756.78%)
Mutual labels:  debian
Fpm Within Docker
Leverage fpm inside pre-baked docker images in order to build and test native DEB and RPM packages.
Stars: ✭ 80 (-94.68%)
Mutual labels:  debian
Rocket.chat.ansible
Deploy Rocket.Chat with Ansible!
Stars: ✭ 80 (-94.68%)
Mutual labels:  debian
Mortar
Framework to join Linux's physical security bricks.
Stars: ✭ 80 (-94.68%)
Mutual labels:  debian
Postinstall
💻 Bash Script to automate post-installation steps
Stars: ✭ 104 (-93.09%)
Mutual labels:  debian

dh-virtualenv

Build Status Docs

Contents

Overview

dh-virtualenv is a tool that aims to combine Debian packaging with self-contained virtualenv based Python deployments.

The idea behind dh-virtualenv is to be able to combine the power of Debian packaging with the sandboxed nature of virtualenvs. In addition to this, using virtualenv enables installing requirements via Python Package Index instead of relying on the operating system provided Python packages. The only limiting factor is that you have to run the same Python interpreter as the operating system.

For complete online documentation including installation instructions, see the online documentation.

Presentations, Blogs & Other Resources

Here are a few external resources that can help you to get a more detailed first impression of dh-virtualenv, or advocate its use in your company or project team.

Using dh-virtualenv

Using dh-virtualenv is fairly straightforward. First, you need to define the requirements of your package in requirements.txt file, in the format defined by pip.

To build a package using dh-virtualenv, you need to add dh-virtualenv in to your build dependencies and write following debian/rules file:

  %:
          dh $@ --with python-virtualenv

Note that you might need to provide additional build dependencies too, if your requirements require them.

Also, you are able to define the root path for your source directory using --sourcedirectory or -D argument:

  %:
          dh $@ --with python-virtualenv --sourcedirectory=root/srv/application

NOTE: Be aware that the configuration in debian/rules expects tabs instead of spaces!

Once the package is built, you have a virtualenv contained in a Debian package and upon installation it gets placed, by default, under /opt/venvs/<packagename>.

For more information and usage documentation, check the accompanying documentation in the doc folder, also available at Read the Docs.

How does it work?

To do the packaging, dh-virtualenv extends debhelper's sequence by inserting a new dh_virtualenv command, which effectively replaces the following commands in the original sequence:

  • dh_auto_clean
  • dh_auto_build
  • dh_auto_test
  • dh_auto_install
  • dh_python2
  • dh_pycentral
  • dh_pysupport

In the new sequence, dh_virtualenv is inserted right before dh_installinit.

Running tests

$ nosetests ./test/test_deployment.py

Building the package in a Docker container

To build dh-virtualenv itself in a Docker container, call docker build --tag dh-venv-builder .. This will build the DEB package for Debian stable by default. Add e.g. --build-arg distro=ubuntu:bionic to build for Ubuntu LTS instead.

The resulting files must be copied out of the build container, using these commands:

mkdir -p dist && docker run --rm dh-venv-builder tar -C /dpkg -c . | tar -C dist -xv

There is also a short-cut for all this, in the form of invoke bdist_deb [--distro=‹id›:‹codename›].

Building the documentation locally

If you execute the following commands in your clone of the repository, a virtualenv with all necessary tools is created. invoke docs then builds the documentation into doc/_build/.

command . .env --yes --develop
invoke docs

To start a watchdog that auto-rebuilds documentation and reloads the opened browser tab on any change, call invoke docs -w -b (stop the watchdog using the -k option).

Releasing a new version

Follow these steps when creating a new release:

  1. Check version in dh_virtualenv/_version.py and debian/changelog.
  2. Make sure doc/changes.rst is complete.
  3. Bump release date in debian/changelog (dch -r).
  4. Tag the release and git push --tags.
  5. Edit release entry on GitHub (add changes).
  6. Update the Ubuntu PPA.
  7. Bump to next release version in dh_virtualenv/_version.py.
  8. Open new section in debian/changelog (with …-0.1+dev added).
  9. Open a new section in doc/changes.rst, so it can be maintained as features are added!

Code of conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

License

Copyright (c) 2013-2017 Spotify AB

dh-virtualenv is licensed under GPL v2 or later. Full license is available in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].