Reputation: 609
I currently use setuptools
to build my Python's package and I have declared the two authors that way in my pyproject.toml
file:
authors = [
{name = "X Y", email = "[email protected]"},
{name = "Z H", email = "[email protected]"},
]
Everything works and I can publish it on PyPI but only the first author is published. How can I display both authors.
I have tried to use the following syntax
authors = ["X Y <[email protected]>, Z H <[email protected]>"]
But I have the following error
ValueError: invalid pyproject.toml config: `project.authors[{data__authors_x}]`.
configuration error: `project.authors[{data__authors_x}]` must be object
Notice that I specify:
[build-system]
requires = ["setuptools","numpy","scipy","wheel"]
build-backend = "setuptools.build_meta"
Upvotes: 7
Views: 3109
Reputation: 22398
Your original notation is the correct one:
authors = [
{name = "X Y", email = "[email protected]"},
{name = "Z H", email = "[email protected]"},
]
but there are some issues that are out of your control.
On one hand it is not entirely clear how this should translate into the Core Metadata notation, which is the notation used inside the distribution artifacts (wheel), and which is then extracted and displayed by PyPI.
On the other hand, the build back-ends (setuptools
included) are not explicit about how they transform from pyproject.toml
notation to Core Metadata notation, and they tend to silently pick the first item of the list and ignore the following ones.
References:
Upvotes: 6