Keywords: dist

# Distributing Python Modules

Greg Ward

Email: gward@python.net

### Abstract:

This document describes the Python Distribution Utilities (``Distutils'') from the module developer's point-of-view, describing how to use the Distutils to make Python modules and extensions easily available to a wider audience with very little overhead for build/release/install mechanics.

- 1 Introduction
- 2 Concepts & Terminology
  - 2.1 A simple example
  - 2.2 General Python terminology
  - 2.3 Distutils-specific terminology
- 3 Writing the Setup Script
  - 3.1 Listing whole packages
  - 3.2 Listing individual modules
  - 3.3 Describing extension modules
    - 3.3.1 Extension names and packages
    - 3.3.2 Extension source files
    - 3.3.3 Preprocessor options
    - 3.3.4 Library options
    - 3.3.5 Other options
  - 3.4 Listing scripts
  - 3.5 Listing additional files
- 4 Writing the Setup Configuration File
- 5 Creating a Source Distribution
  - 5.1 Specifying the files to distribute
  - 5.2 Manifest-related options
- 6 Creating Built Distributions
  - 6.1 Creating dumb built distributions
  - 6.2 Creating RPM packages
  - 6.3 Creating Windows installers
- 7 Reference
  - 7.1 Installing modules: the `install` command family
    - 7.1.1 `install_data`
    - 7.1.2 `install_scripts`
  - 7.2 Creating a source distribution: the `sdist` command
- 8 `distutils.sysconfig` -- System configuration information
- About this document ...