GlossaryΒΆ

Page Status:Complete
Last Reviewed:2014-05-10
Binary Distribution
A specific kind of Built Distribution that contains compiled extensions.
Built Distribution
A Distribution format containing files and metadata that only need to be moved to the correct location on the target system, to be installed. Wheel is such a format, whereas distutil’s Source Distribution is not, in that it requires a build step before it can be installed. This format does not imply that python files have to be precompiled (Wheel intentionally does not include compiled python files).
Distribution
A Python distribution is a versioned archive file that contains Python packages, modules, and other resource files that are used to distribute a Release. The distribution file is what an end-user will download from the internet and install.
Egg
A Built Distribution format introduced by setuptools, which is being replaced by Wheel. For details, see The Internal Structure of Python Eggs and Python Eggs
Extension Module
A module written in the low-level language of the Python implementation: C/C++ for Python, Java for Jython. Typically contained in a single dynamically loadable pre-compiled file, e.g. a shared object (.so) file for Python extensions on Unix, a DLL (given the .pyd extension) for Python extensions on Windows, or a Java class file for Jython extensions.
Known Good Set (KGS)
A set of distributions at specified versions which are compatible with each other. Typically a test suite will be run which passes all tests before a specific set of packages is declared a known good set. This term is commonly used by frameworks and toolkits which are comprised of multiple individual distributions.
Module
The basic unit of code reusability in Python, existing in one of two types: Pure Module, or Extension Module.
Package (Meaning #1)
A directory containing an __init__.py file (ex. mypackage/__init__.py), and also usually containing modules (possibly along with other packages). You can import a package: import mypackage
Package (Meaning #2)
A synonym for Distribution. It is common in Python to refer to a distribution using the term “package”. While the two meanings of the term “package” is not always 100% unambigous, the context of the term “package” is usually sufficient to distinguish the meaning of the word. For example, the python installation tool pip is an acronym for “pip installs packages”. while technically the tool installs distributions. Even the site where distributions are distributed at is called the “Python Package Index” (and not the “Python Distribution Index”).
Package Index
A repository of distributions with a web interface to automate Distribution discovery and consumption.
Project

A library, framework, script, plugin, application, or collection of data or other resources, or some combination thereof that is intended to be packaged into a Distribution.

Since most projects create Distributions using distutils or setuptools, another practical way to define projects currently is something that contains a setup.py at the root of the project src directory, where “setup.py” is the project specification filename used by distutils and setuptools.

Python projects must have unique names, which are registered on PyPI. Each project will then contain one or more Releases, and each release may comprise one or more distributions.

Note that there is a strong convention to name a project after the name of the package that is imported to run that project. However, this doesn’t have to hold true. It’s possible to install a distribution from the project ‘spam’ and have it provide a package importable only as ‘eggs’.

Pure Module
A module written in Python and contained in a single .py file (and possibly associated .pyc and/or .pyo files).
Python Packaging Authority (PyPA)
PyPA is a working group that maintains many of the relevant projects in Python packaging. They host projects on github and bitbucket, and discuss issues on the pypa-dev mailing list.
Python Package Index (PyPI)
PyPI is the default Package Index for the Python community. It is open to all Python developers to consume and distribute their distributions.
Release

A snapshot of a Project at a particular point in time, denoted by a version identifier.

Making a release may entail the publishing of multiple Distributions. For example, if version 1.0 of a project was released, it could be available in both a source distribution format and a Windows installer distribution format.

Requirement
A specification for a package to be installed. pip, the PYPA recommended installer, allows various forms of specification that can all be considered a “requirement”. For more information, see the pip install reference.
Requirements File
A file containing a list of Requirements that can be installed using pip. For more information, see the pip docs on Requirements Files.
setup.py
The project specification file for distutils and setuptools.
Source Archive
An archive containing the raw source code for a Release, prior to creation of an Source Distribution or Built Distribution.
Source Distribution (or “sdist”)
A distribution format (usually generated using python setup.py sdist) that provides metadata and the essential source files needed for installing by a tool like pip, or for generating a Built Distribution.
System Package
A package provided in a format native to the operating system, e.g. an rpm or dpkg file.
Virtual Environment
An isolated Python environment that allows packages to be installed for use by a particular application, rather than being installed system wide. For more information, see the tutorial section on Virtual Environments.
Wheel
A Built Distribution format introduced by PEP427 The Wheel Binary Package Format 1.0, which is intended to replace the Egg format. Wheel is currently supported by pip.
Working Set
A collection of distributions available for importing. These are the distributions that are on the sys.path variable. At most, one Distribution for a project is possible in a working set.

Previous topic

Packaging History