Skip to content

Commit 9ddfba1

Browse files
befelemeCAM-Gerlach
andcommitted
Add glossary definitions of packaging and metadata terms
The definitions were originally included in PEP 639, refining and extending the existing glossary terms. Having the unified vocabulary in place is essential to accurately describe the complex Python packaging landscape. Co-Authored-By: C.A.M. Gerlach <[email protected]>
1 parent 595f76d commit 9ddfba1

File tree

1 file changed

+107
-2
lines changed

1 file changed

+107
-2
lines changed

source/glossary.rst

Lines changed: 107 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,39 @@ Glossary
5454
Python files). See :ref:`package-formats` for more information.
5555

5656

57+
Built Metadata
58+
59+
The concrete form :term:`Core Metadata` takes
60+
when included inside an installed :term:`Project` (``METADATA`` file)
61+
or a :term:`Distribution Archive`
62+
(``PKG-INFO`` in a
63+
:term:`Sdist <Source Distribution (or "sdist")>`
64+
and ``METADATA`` in a :term:`Wheel`).
65+
66+
67+
Core Metadata
68+
69+
The :ref:`specification <core-metadata>`
70+
and the set of :term:`Core Metadata Field`\s it defines
71+
that describe key static attributes of
72+
a :term:`Distribution Package` or :term:`Installed Project`.
73+
74+
75+
Core Metadata Field
76+
77+
A single key-value pair
78+
(or sequence of such with the same name, for multiple-use fields)
79+
defined in the :term:`Core Metadata` spec
80+
and stored in the :term:`Built Metadata`.
81+
Notably, distinct from a :term:`Pyproject Metadata Key`.
82+
83+
84+
Distribution Archive
85+
86+
The physical distribution artifact (i.e. a file on disk)
87+
for a :term:`Distribution Package`.
88+
89+
5790
Distribution Package
5891

5992
A versioned archive file that contains Python :term:`packages <Import
@@ -106,6 +139,14 @@ Glossary
106139
is also commonly called a "package". See :ref:`distribution-package-vs-import-package`
107140
for a breakdown of the differences.
108141

142+
143+
Installed Project
144+
145+
A :term:`Project` that is installed for use with
146+
a Python interpreter or :term:`Virtual Environment`,
147+
as described in the specicifcation :ref:`recording-installed-packages`.
148+
149+
109150
Module
110151

111152
The basic unit of code reusability in Python, existing in one of two
@@ -149,12 +190,64 @@ Glossary
149190
'bar'.
150191

151192

193+
Project Root Directory
194+
195+
The filesystem directory in which
196+
a :term:`Project`'s :term:`source tree <Project Source Tree>` is located.
197+
198+
199+
Project Source Tree
200+
201+
The on-disk format of a :term:`Project` used for development,
202+
containing its raw source code before being packaged
203+
into a
204+
:term:`Source Distribution <Source Distribution (or "sdist")>`
205+
or :term:`Built Distribution`.
206+
207+
208+
Project Source Metadata
209+
210+
Metadata defined by the package author
211+
in a :term:`Project`'s :term:`source tree <Project Source Tree>`,
212+
to be transformed into :term:`Core Metadata field`\s
213+
in the :term:`Built Metadata`
214+
by the project's build backend.
215+
Can be written as :term:`Pyproject Metadata`,
216+
or in a tool-specific format
217+
(under the ``[tool]`` table in ``pyproject.toml``,
218+
or in a tool's own configuration file).
219+
220+
152221
Pure Module
153222

154223
A :term:`Module` written in Python and contained in a single ``.py`` file (and
155224
possibly associated ``.pyc`` and/or ``.pyo`` files).
156225

157226

227+
Pyproject Metadata
228+
229+
The :term:`Project Source Metadata` format
230+
defined by the :ref:`declaring-project-metadata` specification
231+
and originally introduced in :pep:`621`,
232+
stored as :term:`Pyproject Metadata Key`\s
233+
under the ``[project]`` table of a :term:`pyproject.toml` file.
234+
Notably, *not* a tool-specific source metadata format
235+
under the ``[tool]`` table in ``pyproject.toml``.
236+
237+
238+
Pyproject Metadata Key
239+
240+
A top-level TOML key in the ``[project]`` table in ``pyproject.toml``;
241+
part of the :term:`Pyproject Metadata`.
242+
Notably, distinct from a :term:`Core Metadata Field`.
243+
244+
245+
Pyproject Metadata Subkey
246+
247+
A second-level TOML key under a table-valued
248+
:term:`Pyproject Metadata Key`.
249+
250+
158251
Python Packaging Authority (PyPA)
159252

160253
PyPA is a working group that maintains many of the relevant
@@ -236,7 +329,7 @@ Glossary
236329

237330
Source Distribution (or "sdist")
238331

239-
A :term:`distribution <Distribution Package>` format (usually generated
332+
A :term:`distribution <Distribution Archive>` format (usually generated
240333
using ``python -m build --sdist``) that provides metadata and the
241334
essential source files needed for installing by a tool like :ref:`pip`,
242335
or for generating a :term:`Built Distribution`. See :ref:`package-formats`
@@ -264,10 +357,22 @@ Glossary
264357
wide. For more information, see the section on :ref:`Creating and using
265358
Virtual Environments`.
266359

360+
361+
Wheel Format
267362
Wheel
268363

269-
The standard :term:`Built Distribution` format.
364+
The standard :term:`Built Distribution` format
365+
originally introduced in :pep:`427`
366+
and defined by the :ref:`binary-distribution-format` specification.
270367
See :ref:`package-formats` for more information.
368+
Not to be confused with its reference implementation,
369+
the :term:`Wheel Project`.
370+
371+
372+
Wheel Project
373+
374+
The PyPA reference implementation of the :term:`Wheel Format`.
375+
271376

272377
Working Set
273378

0 commit comments

Comments
 (0)