setuptools-ext


Namesetuptools-ext JSON
Version 0.9 PyPI version JSON
download
home_pageNone
SummaryExtension of setuptools to support all core metadata fields
upload_time2024-04-29 08:28:16
maintainerNone
docs_urlNone
authorWim Glenn
requires_python>=3.8
licenseMIT
keywords setuptools packaging metadata
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |pypi|_ |actions|_ |codecov|_ |womm|_

.. |pypi| image:: https://img.shields.io/pypi/v/setuptools-ext.svg
.. _pypi: https://pypi.org/project/setuptools-ext

.. |actions| image:: https://github.com/wimglenn/setuptools-ext/actions/workflows/tests.yml/badge.svg
.. _actions: https://github.com/wimglenn/setuptools-ext/actions/workflows/tests.yml/

.. |codecov| image:: https://codecov.io/gh/wimglenn/setuptools-ext/branch/main/graph/badge.svg
.. _codecov: https://codecov.io/gh/wimglenn/setuptools-ext

.. |womm| image:: https://cdn.rawgit.com/nikku/works-on-my-machine/v0.2.0/badge.svg
.. _womm: https://github.com/nikku/works-on-my-machine

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:

- Setuptools `keywords <https://setuptools.pypa.io/en/latest/references/keywords.html>`_ and |more_keywords|_
- `Declaring project metadata`_ in ``pyproject.toml``

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:

.. code-block::

   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:

.. code-block:: toml

   [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).

.. |more_keywords| replace:: New and Changed ``setup()`` Keywords

.. _PEP 517 Build backend interface: https://peps.python.org/pep-0517/#build-backend-interface
.. _Setuptools: https://setuptools.pypa.io/
.. _Core metadata specifications: https://packaging.python.org/en/latest/specifications/core-metadata/
.. _PEP 621 – Storing project metadata in pyproject.toml: https://peps.python.org/pep-0621/
.. _more_keywords: https://setuptools.pypa.io/en/latest/userguide/keywords.html
.. _Declaring project metadata: https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
.. _add new keyword arguments: https://setuptools.pypa.io/en/latest/userguide/extension.html#adding-setup-arguments

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "setuptools-ext",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "setuptools, packaging, metadata",
    "author": "Wim Glenn",
    "author_email": "hey@wimglenn.com",
    "download_url": "https://files.pythonhosted.org/packages/01/58/75f196d56b8e0949095c209561b2d0b8260a62b797843102b89f6c453464/setuptools_ext-0.9.tar.gz",
    "platform": null,
    "description": "|pypi|_ |actions|_ |codecov|_ |womm|_\n\n.. |pypi| image:: https://img.shields.io/pypi/v/setuptools-ext.svg\n.. _pypi: https://pypi.org/project/setuptools-ext\n\n.. |actions| image:: https://github.com/wimglenn/setuptools-ext/actions/workflows/tests.yml/badge.svg\n.. _actions: https://github.com/wimglenn/setuptools-ext/actions/workflows/tests.yml/\n\n.. |codecov| image:: https://codecov.io/gh/wimglenn/setuptools-ext/branch/main/graph/badge.svg\n.. _codecov: https://codecov.io/gh/wimglenn/setuptools-ext\n\n.. |womm| image:: https://cdn.rawgit.com/nikku/works-on-my-machine/v0.2.0/badge.svg\n.. _womm: https://github.com/nikku/works-on-my-machine\n\nsetuptools-ext\n==============\n\nThis is a `PEP 517 Build backend interface`_ supporting fields in the `Core metadata specifications`_ which are otherwise difficult to provide using existing tools.\nSpecifically, it allows declaring those fields marked with an \"\u2014\" in the rightmost column of the table below by specifying them in a ``[tool.setuptools-ext]`` section of ``pyproject.toml``.\nThe backend otherwise functions identically to ``setuptools.build_meta``, and is in fact a drop-in replacement for the default setuptools build backend.\n\nSetuptools_ lacks a way to specify some fields, despite their validity in Python package metadata according to the spec.\n`PEP 621 \u2013 Storing project metadata in pyproject.toml`_ appears to have punted on some of the fields too.\n\n+-----------------------------------+-------------------------------+---------------------------------+\n| Field                             | setup.py keyword              | pyproject.toml name             |\n+===================================+===============================+=================================+\n| Name                              | name                          | name                            |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Version                           | version                       | version                         |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Dynamic (multiple use)            | \u2014                             | dynamic                         |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Platform (multiple use)           | platforms                     | \u2014                               |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Supported-Platform (multiple use) | \u2014                             | \u2014                               |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Summary                           | description                   | description                     |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Description                       | long_description              | readme                          |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Description-Content-Type          | long_description_content_type | readme                          |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Keywords                          | keywords                      | keywords                        |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Home-page                         | url                           | [project.urls]                  |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Download-URL                      | download_url                  | \u2014                               |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Author                            | author                        | authors                         |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Author-email                      | author_email                  | authors                         |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Maintainer                        | maintainer                    | maintainers                     |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Maintainer-email                  | maintainer_email              | maintainers                     |\n+-----------------------------------+-------------------------------+---------------------------------+\n| License                           | license / license_files       | license                         |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Classifier (multiple use)         | classifiers                   | classifiers                     |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Requires-Dist (multiple use)      | install_requires              | dependencies                    |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Requires-Python                   | python_requires               | requires-python                 |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Requires-External (multiple use)  | \u2014                             | \u2014                               |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Project-URL (multiple-use)        | project_urls                  | [project.urls]                  |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Provides-Extra (multiple use)     | extras_require                | [project.optional-dependencies] |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Provides-Dist (multiple use)      | \u2014                             | \u2014                               |\n+-----------------------------------+-------------------------------+---------------------------------+\n| Obsoletes-Dist (multiple use)     | \u2014                             | \u2014                               |\n+-----------------------------------+-------------------------------+---------------------------------+\n\nReference links for the info above:\n\n- Setuptools `keywords <https://setuptools.pypa.io/en/latest/references/keywords.html>`_ and |more_keywords|_\n- `Declaring project metadata`_ in ``pyproject.toml``\n\nUsage\n-----\n\nTo 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:\n\n.. code-block::\n\n   Supported-Platform: RedHat 8.3\n   Requires-External: C\n   Requires-External: libpng (>=1.5)\n   Requires-External: make; sys_platform != \"win32\"\n\nYou 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:\n\n.. code-block:: toml\n\n   [build-system]\n   requires = [\"setuptools-ext\"]\n   build-backend = \"setuptools_ext\"\n\n   ...\n\n   [tool.setuptools-ext]\n   supported-platform = [\n       \"RedHat 8.3\",\n   ]\n   requires-external = [\n       \"C\",\n       \"libpng (>=1.5)\",\n       'make; sys_platform != \"win32\"'\n   ]\n\nThe metadata fields may then be consumed by automated tooling for building RPM packages with system dependencies, for example.\n\n*Note:* This package does not `add new keyword arguments`_ to ``setup.py`` (that's out of scope for a PEP 517 build backend).\n\n.. |more_keywords| replace:: New and Changed ``setup()`` Keywords\n\n.. _PEP 517 Build backend interface: https://peps.python.org/pep-0517/#build-backend-interface\n.. _Setuptools: https://setuptools.pypa.io/\n.. _Core metadata specifications: https://packaging.python.org/en/latest/specifications/core-metadata/\n.. _PEP 621 \u2013 Storing project metadata in pyproject.toml: https://peps.python.org/pep-0621/\n.. _more_keywords: https://setuptools.pypa.io/en/latest/userguide/keywords.html\n.. _Declaring project metadata: https://packaging.python.org/en/latest/specifications/declaring-project-metadata/\n.. _add new keyword arguments: https://setuptools.pypa.io/en/latest/userguide/extension.html#adding-setup-arguments\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extension of setuptools to support all core metadata fields",
    "version": "0.9",
    "project_urls": {
        "Homepage": "https://github.com/wimglenn/setuptools-ext"
    },
    "split_keywords": [
        "setuptools",
        " packaging",
        " metadata"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58f1195a0e502235efe7716622da766fa3f55d38c7cc89d1bd2796ef2c99713b",
                "md5": "bfda216122e217ed1d6955c2e9f31a51",
                "sha256": "8c035cb78e5cdddee5851d77de79ff2ceba68b882795f0a9f385f6a0158d5a3e"
            },
            "downloads": -1,
            "filename": "setuptools_ext-0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bfda216122e217ed1d6955c2e9f31a51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7203,
            "upload_time": "2024-04-29T08:28:15",
            "upload_time_iso_8601": "2024-04-29T08:28:15.003165Z",
            "url": "https://files.pythonhosted.org/packages/58/f1/195a0e502235efe7716622da766fa3f55d38c7cc89d1bd2796ef2c99713b/setuptools_ext-0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "015875f196d56b8e0949095c209561b2d0b8260a62b797843102b89f6c453464",
                "md5": "780817af6dcd585966ff20eb642b9506",
                "sha256": "ced56c030b11ee3991ef7ade25db751c1c5b4e8734c88de648ad2dec572406c6"
            },
            "downloads": -1,
            "filename": "setuptools_ext-0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "780817af6dcd585966ff20eb642b9506",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8381,
            "upload_time": "2024-04-29T08:28:16",
            "upload_time_iso_8601": "2024-04-29T08:28:16.585048Z",
            "url": "https://files.pythonhosted.org/packages/01/58/75f196d56b8e0949095c209561b2d0b8260a62b797843102b89f6c453464/setuptools_ext-0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-29 08:28:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wimglenn",
    "github_project": "setuptools-ext",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "setuptools-ext"
}
        
Elapsed time: 0.80010s