• Home
  • Raw
  • Download

Lines Matching full:distribution

17 the metadata of an installed `Distribution Package <https://packaging.python.org/en/latest/glossary…
27 ``importlib.metadata`` operates on third-party *distribution packages*
39 One *distribution package* can contain multiple *import packages*
42 may map to multiple *distribution packages*
47 By default, distribution metadata can live on the file system
70 `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`…
93 You can get the :ref:`metadata for a distribution <metadata>`::
98 You can also get a :ref:`distribution's version number <version>`, list its
99 :ref:`constituent files <files>`, and get a list of the distribution's
106 module when queried for a distribution package which is not installed in the
129 their :attr:`!EntryPoint.dist` attribute (as different :class:`!Distribution`
148 information regarding the distribution package that provides the entry point.
218 Distribution metadata
223 Return the distribution metadata corresponding to the named
224 distribution package as a :class:`PackageMetadata` instance.
226 Raises :exc:`PackageNotFoundError` if the named distribution
237 Every `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Pac…
243 the values are returned unparsed from the distribution metadata::
266 Distribution versions
271 Return the installed distribution package version for the named
272 distribution package.
274 Raises :exc:`PackageNotFoundError` if the named distribution
278 `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`…
287 Distribution files
293 distribution package.
295 Raises :exc:`PackageNotFoundError` if the named distribution
298 Returns :const:`None` if the distribution is found but the installation
305 ``size``, and ``hash`` properties corresponding to the distribution
309 `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_
310 name and returns all of the files installed by this distribution. Each file is reported
346 distribution is not known to have the metadata present.
350 Distribution requirements
356 distribution package.
358 Raises :exc:`PackageNotFoundError` if the named distribution
361 …full set of requirements for a `Distribution Package <https://packaging.python.org/en/latest/gloss…
370 .. _import-distribution-package-mapping:
372 Mapping import to distribution packages
378 names found via :attr:`sys.meta_path` to the names of the distribution
382 multiple distribution packages), each top level import name maps to a
383 list of distribution names rather than mapping directly to a single name.
385 …venience method to resolve the `Distribution Package <https://packaging.python.org/en/latest/gloss…
404 .. function:: distribution(distribution_name)
406 Return a :class:`Distribution` instance describing the named
407 distribution package.
409 Raises :exc:`PackageNotFoundError` if the named distribution
412 .. class:: Distribution
414 Details of an installed distribution package.
416 Note: different :class:`!Distribution` instances do not currently compare
417 equal, even if they relate to the same installed distribution and
421 you can get all of that information from the :class:`!Distribution` class.
422 :class:`!Distribution` is an abstract object that represents the metadata for
423 a Python `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-…
424 You can get the concreate :class:`!Distribution` subclass instance for an installed
425 distribution package by calling the :func:`distribution` function::
427 >>> from importlib.metadata import distribution # doctest: +SKIP
428 >>> dist = distribution('wheel') # doctest: +SKIP
433 :class:`!Distribution` instance::
438 There are all kinds of additional metadata available on :class:`!Distribution`
458 Distribution Discovery
462 for file system and zip file `Distribution Package <https://packaging.python.org/en/latest/glossary…
472 Because `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-P…
475 the metadata for a distribution is found through import
476 system :ref:`finders <finders-and-loaders>`. To find a distribution package's metadata,
480 By default ``importlib.metadata`` installs a finder for distribution packages
495 """Return an iterable of all Distribution instances capable of
503 What this means in practice is that to support finding distribution package
505 ``Distribution`` and implement the abstract methods. Then from
506 a custom finder, return instances of this derived ``Distribution`` in the
540 each distribution served by the database matching the query. For
553 honor the ``context.path`` and only yield ``Distribution``\ s pertinent to that
558 class DatabaseDistribution(importlib.metadata.Distribution):
564 Read a file like "METADATA" for the current distribution.
576 raise RuntimeError("This distribution has no file system")
584 ``RECORD`` (required for ``Distribution.files``) or override the
585 implementation of ``Distribution.files``. See the source for more inspiration.