Metadata (PEP 621) partis.pyproj.pkginfo#

PkgInfo#

class PkgInfo(project, root=None)[source]#

Bases: object

__init__(project, root=None)[source]#

Internal container for normalizing metadata as defined in PEP 621 and

Parameters:
  • project (dict) – The project meta-data as defined in ‘pyproject.toml’. May be the parsed [project] table from a ‘pyproject.toml’ file located in the ‘root’ directory.

  • root (None | str | pathlib.Path) – Path to the root project directory that would contain ‘pyproject.toml’. This is used to resolve file paths defined in the project metatada. If there are no files referenced, then this value has no effect.

add_dependencies(deps)[source]#

Used to add dependencies

Parameters:

deps (List[ str ]) – dependencies to add

Returns:

pkg_info – Resulting package info

property requires_dist#

Computes total list of install requirements

property provides_extra#

Provided extras

encode_entry_points()[source]#

Generate encoded content for .dist_info/entry_points.txt

Returns:

content (bytes)

encode_pkg_info()[source]#

Generate encoded content for PKG-INFO, or .dist_info/METADATA

Returns:

content (bytes)

PkgInfoReq#

class PkgInfoReq(req, extra='')[source]#

Bases: object

Internal container for normalizing “Requires-Dist” header metadata

PkgInfoURL#

class PkgInfoURL(label='', url='')[source]#

Bases: object

Internal container for normalizing Project-URL

PkgInfoAuthor#

class PkgInfoAuthor(name='', email='')[source]#

Bases: object

Internal container for normalizing Author/Maintainer and Author-email/Maintainer-email header metadata