Debian Python Policy

Neil Schemenauer

Matthias Klose

Gregor Hoffleit

Josselin Mouette

Joe Wreschnig

This manual is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is available as /usr/share/common-licences/GPL in the Debian GNU/Linux distribution or on the World Wide Web at The GNU Public Licence.

You can also obtain it by writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


This document describes the packaging of Python within the Debian GNU/Linux distribution and the policy requirements for packaged Python programs and modules.

Table of Contents

1. Python Packaging
1.1. Versions
1.2. Main package
1.3. Python Interpreter
1.3.1. Interpreter Name
1.3.2. Interpreter Location
1.4. Module Path
1.5. Documentation
2. Packaged Modules
2.1. Types of Python Modules
2.2. Module Package Names
2.3. Specifying Supported Versions
2.4. Dependencies
2.5. Provides
2.6. Modules Bytecompilation
3. Python Programs
3.1. Programs using the default python
3.1.1. Programs Shipping Private Modules
3.2. Programs Using a Particular Python Version
4. Programs Embedding Python
4.1. Building Embedded Programs
4.2. Embedded Python Dependencies
5. Interaction with Locally Installed Python Versions
A. Build Dependencies
B. Packaging Tools
B.1. python-support
B.2. python-central
C. Upgrade Procedure