Skip to content

Springerle/debianized-pypi-mold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debianized-pypi-mold

A cookiecutter template to make a Debian package from an application's existing Python package as released to PyPI or a private repository. It creates a project to build a self-contained Python virtualenv wrapped into a Debian package (an "omnibus" package, all passengers on board). The packaged virtualenv is kept in sync with the host's interpreter automatically.

See spotify/dh-virtualenv for more details, and 1and1/debianized-sentry for an example project.

GroupsMIT licensed

The similar dh-virtualenv-mold adds packaging metadata to an existing Python project under your control. That one should also be used when you want to contribute Debian packaging to an upstream project.

Preparations

In case you don't have the cookiecutter command line tool yet, here's how to install it.

Using the template

Creating the packaging project goes like this (make sure you're in a suitable directory like ~/src):

cookiecutter https://github.com/Springerle/debianized-pypi-mold.git
cd ‹projectname›
dch -r "" # add a proper distro and date to the changelog

It makes sense to git init the created directory directly afterwards, and git add all files, so that you have the template version of files saved in the git staging area. Do that before any additional files are generated, that you don't want to have in your repository.

Next check all the files for necessary changes regarding the software your're packaging. The template makes some assumptions that often fit, but there's always some differences in details. Delete anything you do not need, e.g. from the list of build dependencies. Search for TODO to make sure you did not overlook things that typically have to be changed.

For Python3, you should look into the files debian/control and debian/*.triggers, and adapt them accordingly.

The license used for the packaging project is “BSD 3-clause”, change the LICENSE file and “BSD” references in README.md and setup.py as needed.

See the template's README for more information on how to actually build the DEB package.

About

🍪 Cookiecutter template for projects that package a PyPI release using dh-virtualenv

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published