Revision 5 as of 2009-05-23 20:11:07

Clear message


In this blueprint we propose extending python-distutils-extra by a "do what I mean" mode where it automatically chooses the right destination path and action for various known file types such as Python modules, exectuable scripts, icons, desktop files, etc. The goal is that the typical only has to contain meta information like description, version, and author.

We also discuss Debian packaging generation.

Release Note

This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)

It is mandatory.


One of Python's native and very popular build systems is "distutils" which comes shipped with Python itself. It is fairly limited, though, and requires the user to learn a lot about build systems. python-distutils-extra adds some functionality for i18n, but there are still some standard use cases missing.

With our goal of supporting the opportunistic programmer and our pre-selection of technologies, a lot of the build system design can be made implicit ("convention over configuration"), which will greatly reduce the amount of learning necessary for installing a project and building a package.

User stories


The current Jockey project needs a very large and redundant, setup.cfg, and

With the improved distutils-extras, setup.cfg and can be dropped completely, and can be dropped to the metadata:

from import setup


    description='UI for managing third-party and non-free drivers',
    license='GPL v2 or later',
    author='Martin Pitt',


  • Uses standard PyGTK and Python libraries and technologies.
  • Automatically generated Debian package produces single binary only. No library/public package building.


Project structure

  • All directories with are Python packages which are used and shipped

  • TBD: Scripts in ./bin/ ?

For a standard project which uses well-known file types and a standard directory layout, should only contain metadata about the project which cannot be inferred from the source code.

Required fields:

  • name
  • version
  • license
  • description
  • author

Optional fields:

  • author_email
  • url (homepage)

Debian packaging

  • fully automatically generated from scratch, working, Policy compliant


distutils-extra extensions

  • Compiling PyKDE .ui files to .py files with pykdeuic4

distutils-extra automatic

  • Python packages (directory with

  • D-Bus configuration (*.conf with magic string)

  • D-Bus service (*.service with magic string)

    • If it has an User= line → system service, otherwise session service




  • *.po, build *.pot: already provided by distutils-extras

  • Icons in data/icons/size/category/*.{png,svg}: already provided by distutils-extras

  • po/

  • cmdclass (default to distutils-extra classes)

  • supplementary data files: data/foo/usr/share/project/foo

  • scripts: TBD

Debian packaging

Based on the information in and the source code, we can also generate a working Debian packaging.


  • integration? ./ debian ?

  • into distutils-extras or quickly or ???
  • create if not existing/update if existing? (changelog/dependencies)


  • project name, version, author, email from
  • description: "new release"
  • distro target: needs argument from environment; default to lsb_release -c?


constant (6 for hardy support)


  • static,



  • no dh_install, upstream build system DTRT
  • Source, Package, Maintainer, Description: from
  • Section, Priority, Standards-Version, XS-Python-Version: constant
  • Build-Depends: static (no tests), or binary depends (if test cases available)
  • Depends: grep all *.py for import statements, check which package provides them

Test/Demo Plan

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to for tracking test coverage.

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.