Skip to main content

Extension of setuptools to support all core metadata fields

Project description

pypi actions codecov womm

setuptools-ext

This is a PEP 517 Build backend interface supporting fields in the Core metadata specifications which are otherwise difficult to provide using existing tools. Specifically, it allows declaring those fields marked with an “—” in the rightmost column of the table below by specifying them in a [tool.setuptools-ext] section of pyproject.toml. The backend otherwise functions identically to setuptools.build_meta, and is in fact a drop-in replacement for the default setuptools build backend.

Setuptools lacks a way to specify some fields, despite their validity in Python package metadata according to the spec. PEP 621 – Storing project metadata in pyproject.toml appears to have punted on some of the fields too.

Field

setup.py keyword

pyproject.toml name

Name

name

name

Version

version

version

Dynamic (multiple use)

dynamic

Platform (multiple use)

platforms

Supported-Platform (multiple use)

Summary

description

description

Description

long_description

readme

Description-Content-Type

long_description_content_type

readme

Keywords

keywords

keywords

Home-page

url

[project.urls]

Download-URL

download_url

Author

author

authors

Author-email

author_email

authors

Maintainer

maintainer

maintainers

Maintainer-email

maintainer_email

maintainers

License

license / license_files

license

Classifier (multiple use)

classifiers

classifiers

Requires-Dist (multiple use)

install_requires

dependencies

Requires-Python

python_requires

requires-python

Requires-External (multiple use)

Project-URL (multiple-use)

project_urls

[project.urls]

Provides-Extra (multiple use)

extras_require

[project.optional-dependencies]

Provides-Dist (multiple use)

Obsoletes-Dist (multiple use)

Reference links for the info above:

Usage

To offer a simple example, if you want to add a Supported-Platform and the Requires-External field three times, producing these lines in the .dist-info/METADATA file:

Supported-Platform: RedHat 8.3
Requires-External: C
Requires-External: libpng (>=1.5)
Requires-External: make; sys_platform != "win32"

You would configure the tool like this in pyproject.toml, specifying a build dependency on setuptools-ext and then adding the fields in a [tool.setuptools-ext] section:

[build-system]
requires = ["setuptools-ext"]
build-backend = "setuptools_ext"

...

[tool.setuptools-ext]
supported-platform = [
    "RedHat 8.3",
]
requires-external = [
    "C",
    "libpng (>=1.5)",
    'make; sys_platform != "win32"'
]

The metadata fields may then be consumed by automated tooling for building RPM packages with system dependencies, for example.

Note: This package does not add new keyword arguments to setup.py (that’s out of scope for a PEP 517 build backend).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geiffg-1.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geiffg-1.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file geiffg-1.1.1.tar.gz.

File metadata

  • Download URL: geiffg-1.1.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for geiffg-1.1.1.tar.gz
Algorithm Hash digest
SHA256 bfaa88d5e51c0223b35bcc2f4dfcd2255d22db1f1d254af411fcaf22dd94d3c1
MD5 7ee30d8c26a60b2096a0f8ed4666b46a
BLAKE2b-256 a8687b839bf1713c160c1c29f8c769bc86765f8ed579c7ef03f1479b9656b21b

See more details on using hashes here.

File details

Details for the file geiffg-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: geiffg-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for geiffg-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 566d7a7b3d18053159d6ef7692d3eadf786030967c4d7f08534fc1245716c2f8
MD5 317a072b7fbeb2b06bf446cc414f50e1
BLAKE2b-256 416b4f93e8f025235e78a10c31cfdfb1b974269c46989d24436024ae0a68265b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page