#
5 Creating a Source Distribution

As shown in section 2.1, you use the `sdist` command to create a source distribution. In the simplest case,

      python setup.py sdist

(assuming you haven't specified any `sdist` options in the setup script or config file), `sdist` creates the archive of the default format for the current platform. The default formats are:

Platform | Default archive format for source distributions
--- | ---
`Unix` | gzipped tar file (.tar.gz)
`Windows` | zip file

You can specify as many formats as you like using the --formats option, for example:

      python setup.py sdist --formats=gztar,zip

to create a gzipped tarball and a zip file. The available formats are:

Format | Description | Notes
--- | --- | ---
`zip` | zip file (.zip) | (1)
`gztar` | gzipped tar file (.tar.gz) | (2)
`ztar` | compressed tar file (.tar.Z) |
`tar` | tar file (.tar) |

Notes:

(1)
  default on Windows
(2)
  default on Unix

Subsections

- 5.1 The manifest and manifest template
- 5.2 Manifest-related options