Skip to main content

Debian packaging tools

Project description

https://travis-ci.org/xolox/python-deb-pkg-tools.svg?branch=master

The Python package deb-pkg-tools is a collection of functions to work with Debian packages and repositories. Some of those functions have a command line interface (see below) because they’re very convenient to use in shell scripts, while other functions are meant to be called directly from Python code. It’s currently tested on Python 2.6, 2.7 and 3.4.

Status

On the one hand the deb-pkg-tools package is based on my experiences with Debian packages and repositories over the past couple of years, on the other hand deb-pkg-tools itself is quite young. Then again most functionality is covered by automated tests; at the time of writing coverage is around 90% (some of the error handling is quite tricky to test if we also want to test the non-error case, which is of course the main focus :-)

Installation and usage

You can install the deb-pkg-tools package using the following command:

$ pip install deb-pkg-tools

After installation you’ll have the deb-pkg-tools program available:

$ deb-pkg-tools --help
Usage: deb-pkg-tools [OPTIONS]

Supported options:

  -i, --inspect=FILE          inspect the metadata in a *.deb archive
  -b, --build=DIR             build a Debian package with `dpkg-deb --build'
  -u, --update-repo=DIR       create/update a trivial package repository
  -a, --activate-repo=DIR     enable `apt-get' to install packages from a
                              trivial repository (requires root/sudo privilege)
  -d, --deactivate-repo=DIR   cleans up after --activate-repo
                              (requires root/sudo privilege)
  -w, --with-repo=DIR CMD...  create/update a trivial package repository,
                              activate the repository, run the positional
                              arguments as an external command (usually `apt-get
                              install') and finally deactivate the repository
  -v, --verbose               make more noise
  -h, --help                  show this message and exit

One thing to note is that the operation of deb-pkg-tools --update-repo can be influenced by a configuration file. For details about this, please refer to the documentation on deb_pkg_tools.repo.select_gpg_key().

If you’re interested in using deb-pkg-tools as a Python module, please refer to the function reference on Read the Docs.

Dependencies

The deb-pkg-tools package depends on the python-debian package for control file parsing (it will be automatically installed as a dependency). The following external programs are also required (depending on which functionality you need of course):

Program Package
apt-ftparchive apt-utils
apt-get apt
ar binutils
cp coreutils
dpkg-deb dpkg
dpkg-scanpackages dpkg-dev
du coreutils
fakeroot fakeroot
gpg gnupg
gzip gzip
lintian lintian
tar tar

The majority of these programs/packages will already be installed on most Debian based systems so you should only need the following to get started:

$ sudo apt-get install binutils dpkg-dev fakeroot lintian

Contact

The latest version of deb-pkg-tools is available on PyPI and GitHub. The documentation is hosted on Read the Docs. For bug reports please create an issue on GitHub. If you have questions, suggestions, etc. feel free to send me an e-mail at peter@peterodding.com.

License

This software is licensed under the MIT license.

© 2014 Peter Odding.

Release history Release notifications

History Node

4.5

History Node

4.4

History Node

4.3

History Node

4.2

History Node

4.1

History Node

4.0.2

History Node

4.0.1

History Node

4.0

History Node

3.1

History Node

3.0

History Node

2.0

History Node

1.37

History Node

1.36

History Node

1.35

History Node

1.34.1

History Node

1.34

History Node

1.33

History Node

1.32.2

History Node

1.32

History Node

1.31

History Node

1.30

History Node

1.29.4

History Node

1.29.3

History Node

1.29.2

History Node

1.29

History Node

1.28

History Node

1.27.3

History Node

1.27.2

History Node

1.27.1

History Node

1.27

History Node

1.26.4

History Node

1.26.2

History Node

1.26

History Node

1.24.1

History Node

1.24

History Node

1.23.4

History Node

1.23.3

History Node

1.23.2

History Node

1.23.1

History Node

1.23

History Node

1.22.6

History Node

1.22.5

History Node

1.22.4

History Node

1.22.3

History Node

1.22.2

History Node

1.22.1

History Node

1.22

History Node

1.20.8

History Node

1.20.7

History Node

1.20.6

History Node

1.20.4

History Node

1.20.3

History Node

1.20.2

History Node

1.20.1

History Node

1.20

History Node

1.18.5

History Node

1.18.4

History Node

1.18.2

History Node

1.18.1

History Node

1.18

History Node

1.17.7

History Node

1.17.6

History Node

1.17.4

History Node

1.17.3

History Node

1.17.2

History Node

1.17.1

History Node

1.17

History Node

1.15.2

History Node

1.15.1

This version
History Node

1.15

History Node

1.14.7

History Node

1.14.4

History Node

1.14.3

History Node

1.14.2

History Node

1.14.1

History Node

1.13

History Node

1.4.1

History Node

1.4

History Node

1.3.1

History Node

1.3

History Node

1.2

History Node

1.1.4

History Node

1.1.3

History Node

1.1.2

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
deb-pkg-tools-1.15.tar.gz (24.4 kB) Copy SHA256 hash SHA256 Source None May 10, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page