Yurttas/PL/SL/python/docs/core-python-programming/doc/20/dist/source-dist.html

From ZCubes Wiki
Revision as of 19:35, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<div class="navigation"> {| width="100%" cellspacing="2" align="center" | yurttas/PL/SL/python/docs/core-python-programming/doc/20/dist/setup-config.html|[[Image:yurtta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


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 format is gzip'ed tar file (.tar.gz) on Unix, and ZIP file on Windows. ** no Mac OS support here **

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),(3)
gztar gzip'ed tar file (.tar.gz) (2),(4)
bztar bzip2'ed tar file (.tar.gz) (4)
ztar compressed tar file (.tar.Z) (4)
tar tar file (.tar) (4)

Notes:

(1)
default on Windows
(2)
default on Unix
(3)
requires either external zip utility or zipfile module (not part of the standard Python library)
(4)
requires external utilities: tar and possibly one of gzip, bzip2, or compress

Subsections


See About this document... for information on suggesting changes.