I’ve been using python for about ten years now. Packaging has always been a bit of a sore subject; say five years ago the answer was to find a setup.py that works, copy it and question nothing. It didn’t help that prominent packages (numpy, scipy, etc) have very complicated setup.py files and didn’t make good starting points. Sometime along the way, I started using setup.cfg as a “better” way. The documentation for setup.cfg is relatively sparse or poor, but minor errors in files didn’t break “python -m pip install -e .” to install the current module. for example, I accidentally had two identical entries for packages= for years and none of the tooling complained. Fast forward to today, and to my surprise my setup.cfg that worked properly with even recent setuptools versions (at least 50 something) no longer works. Doing nothing, I got this very obscure error:
/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Traceback (most recent call last):
...I elided the rest, use_scm_version=True not in a git repo was the problem
After correcting that, the .git folder not being copied over, setuptools is still not happy:
(neos) [bdube:~/src/neos_prysm]$ pip install -e .
Obtaining file:///Users/bdube/src/neos_prysm
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
error: Multiple top-level packages discovered in a flat-layout: ['nb', 'neos', 'data'].
To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.
If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:
1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names
To find more information, look for "package discovery" on setuptools docs.
[end of output]
In this setup.cfg, there was a packages = neos line
I could not convince setuptools that in fact there was a specification for what packages to use, and gave up and decided to try pyproject.toml. I interpret things as “PyPa has broken setuptools compatiblility with setup.cfg and I can use an old version of setuptools, or stop using setup.cfg”.
Syntax errors in the TOML file (missing quotes) provide massively not user friendly errors with pyproject.toml, such as this delightful wall of red:
$ pip install -e .
Obtaining file:///Users/bdube/src/neos_prysm
ERROR: Exception:
Traceback (most recent call last):
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 341, in run
requirement_set = resolver.resolve(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 75, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 506, in collect_root_requirements
req = self._make_requirement_from_install_req(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 468, in _make_requirement_from_install_req
cand = self._make_candidate_from_link(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 188, in _make_candidate_from_link
self._editable_candidate_cache[link] = EditableCandidate(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 316, in __init__
super().__init__(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 161, in __init__
self.dist = self._prepare()
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 230, in _prepare
dist = self._prepare_distribution()
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 326, in _prepare_distribution
return self._factory.preparer.prepare_editable_requirement(self._ireq)
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 551, in prepare_editable_requirement
dist = _get_prepared_distribution(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 58, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 31, in prepare_distribution_metadata
self.req.load_pyproject_toml()
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 464, in load_pyproject_toml
pyproject_toml_data = load_pyproject_toml(
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_internal/pyproject.py", line 64, in load_pyproject_toml
pp_toml = tomli.loads(f.read())
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/tomli/_parser.py", line 102, in loads
pos = key_value_rule(src, pos, out, header, parse_float)
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/tomli/_parser.py", line 326, in key_value_rule
pos, key, value = parse_key_value_pair(src, pos, parse_float)
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/tomli/_parser.py", line 369, in parse_key_value_pair
pos, value = parse_value(src, pos, parse_float)
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/tomli/_parser.py", line 649, in parse_value
raise suffixed_err(src, pos, "Invalid value")
pip._vendor.tomli.TOMLDecodeError: Invalid value (at line 8, column 11)
If one of the scientists that uses my package and is totally disinterested in “software itself” saw this error, they might throw the computer out the window.
Perservering, my license = “unlicensed” input for proprietary code made the parser angry:
Obtaining file:///Users/bdube/src/neos_prysm
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [80 lines of output]
/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py:257: UserWarning: Unknown distribution option: 'use_scm_version'
warnings.warn(msg)
configuration error: `project.license` must be valid exactly by one definition (2 matches found):
- keys:
'file': {type: string}
required: ['file']
- keys:
'text': {type: string}
required: ['text']
DESCRIPTION:
`Project license <https://www.python.org/dev/peps/pep-0621/#license>;`_.
GIVEN VALUE:
"unlicensed"
OFFENDING RULE: 'oneOf'
DEFINITION:
{
"oneOf": [
{
"properties": {
"file": {
"type": "string",
"$$description": [
"Relative path to the file (UTF-8) which contains the license for the",
"project."
]
}
},
"required": [
"file"
]
},
{
"properties": {
"text": {
"type": "string",
"$$description": [
"The license of the project whose meaning is that of the",
"`License field from the core metadata",
"<https://packaging.python.org/specifications/core-metadata/#license>;`_."
]
}
},
"required": [
"text"
]
}
]
}
Traceback (most recent call last):
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
return self._get_build_requires(
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
self.run_setup()
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(code, locals())
File "<string>", line 6, in <module>
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 151, in setup
dist.parse_config_files()
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 868, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 58, in apply_configuration
config = read_configuration(filepath, True, ignore_option_errors, dist)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 122, in read_configuration
validate(subset, filepath)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-8rortaz5/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 47, in validate
raise error from None
ValueError: invalid pyproject.toml config: `project.license`
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
This error message is over 100 lines long, and all of the indented content above wastes tremendous space. Opening the PEP 621 page above, I see that the docs are absolutely clear as mud. Everything uses the language “table” which is unfamiliar jargon (object would be more familiar). Some of the first results from google, e.g. this page (#1 for me) are not the correct format for listing authors. While PyPa is not responsible for third party blogs, I have to imagine this syntax was once valid and has been made invalid, which seems to be a theme here. Correcting most of those errors, I get to this, the mother of all errors clocking in at 563(!!!) lines:
Obtaining file:///Users/bdube/src/neos_prysm
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [544 lines of output]
configuration error: `project` must not contain {'packages', 'homepage', 'python', 'documentation', 'repository'} properties
DESCRIPTION:
Data structure for the **project** table inside ``pyproject.toml`` (as
initially defined in :pep:`621`)
GIVEN VALUE:
{
"name": "neosprysm",
"version": "0.1",
"description": "NEOS integrated diffraction model",
"authors": [
{
"name": "Brandon Dube",
"email": "brandon.dube@jpl.nasa.gov"
}
],
"license": {
"file": "LICENSE.md"
},
"python": "^3.6",
"homepage": "https://github.jpl.nasa.gov/bdube/neos_prysm",
"repository": "https://github.jpl.nasa.gov/bdube/neos_prysm",
"documentation": "https://github.jpl.nasa.gov/bdube/neos_prysm",
"keywords": [
"neos"
],
"packages": [
"neos"
],
"classifiers": [
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8"
]
}
OFFENDING RULE: 'additionalProperties'
DEFINITION:
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://packaging.python.org/en/latest/specifications/declaring-project-metadata/",
"title": "Package metadata stored in the ``project`` table",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name (primary identifier) of the project. MUST be statically defined.",
"format": "pep508-identifier"
},
"version": {
"type": "string",
"description": "The version of the project as supported by :pep:`440`.",
"format": "pep440"
},
"description": {
"type": "string",
"$$description": [
"The `summary description of the project",
"<https://packaging.python.org/specifications/core-metadata/#summary>;`_"
]
},
"readme": {
"$$description": [
"`Full/detailed description of the project in the form of a README",
"<https://www.python.org/dev/peps/pep-0621/#readme>;`_",
"with meaning similar to the one defined in `core metadata's Description",
"<https://packaging.python.org/specifications/core-metadata/#description>;`_"
],
"oneOf": [
{
"type": "string",
"$$description": [
"Relative path to a text file (UTF-8) containing the full description",
"of the project. If the file path ends in case-insensitive ``.md`` or",
"``.rst`` suffixes, then the content-type is respectively",
"``text/markdown`` or ``text/x-rst``"
]
},
{
"type": "object",
"allOf": [
{
"anyOf": [
{
"properties": {
"file": {
"type": "string",
"$$description": [
"Relative path to a text file containing the full description",
"of the project."
]
}
},
"required": [
"file"
]
},
{
"properties": {
"text": {
"type": "string",
"description": "Full text describing the project."
}
},
"required": [
"text"
]
}
]
},
{
"properties": {
"content-type": {
"type": "string",
"$$description": [
"Content-type (:rfc:`1341`) of the full description",
"(e.g. ``text/markdown``). The ``charset`` parameter is assumed",
"UTF-8 when not present."
],
"$comment": "TODO: add regex pattern or format?"
}
},
"required": [
"content-type"
]
}
]
}
]
},
"requires-python": {
"type": "string",
"format": "pep508-versionspec",
"$$description": [
"`The Python version requirements of the project",
"<https://packaging.python.org/specifications/core-metadata/#requires-python>;`_."
]
},
"license": {
"description": "`Project license <https://www.python.org/dev/peps/pep-0621/#license>;`_.",
"oneOf": [
{
"properties": {
"file": {
"type": "string",
"$$description": [
"Relative path to the file (UTF-8) which contains the license for the",
"project."
]
}
},
"required": [
"file"
]
},
{
"properties": {
"text": {
"type": "string",
"$$description": [
"The license of the project whose meaning is that of the",
"`License field from the core metadata",
"<https://packaging.python.org/specifications/core-metadata/#license>;`_."
]
}
},
"required": [
"text"
]
}
]
},
"authors": {
"type": "array",
"items": {
"$id": "#/definitions/author",
"title": "Author or Maintainer",
"$comment": "https://www.python.org/dev/peps/pep-0621/#authors-maintainers",
"type": "object",
"properties": {
"name": {
"type": "string",
"$$description": [
"MUST be a valid email name, i.e. whatever can be put as a name, before an",
"email, in :rfc:`822`."
]
},
"email": {
"type": "string",
"format": "idn-email",
"description": "MUST be a valid email address"
}
}
},
"$$description": [
"The people or organizations considered to be the 'authors' of the project.",
"The exact meaning is open to interpretation (e.g. original or primary authors,",
"current maintainers, or owners of the package)."
]
},
"maintainers": {
"type": "array",
"items": {
"$id": "#/definitions/author",
"title": "Author or Maintainer",
"$comment": "https://www.python.org/dev/peps/pep-0621/#authors-maintainers",
"type": "object",
"properties": {
"name": {
"type": "string",
"$$description": [
"MUST be a valid email name, i.e. whatever can be put as a name, before an",
"email, in :rfc:`822`."
]
},
"email": {
"type": "string",
"format": "idn-email",
"description": "MUST be a valid email address"
}
}
},
"$$description": [
"The people or organizations considered to be the 'maintainers' of the project.",
"Similarly to ``authors``, the exact meaning is open to interpretation."
]
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of keywords to assist searching for the distribution in a larger catalog."
},
"classifiers": {
"type": "array",
"items": {
"type": "string",
"format": "trove-classifier",
"description": "`PyPI classifier <https://pypi.org/classifiers/>;`_."
},
"$$description": [
"`Trove classifiers <https://pypi.org/classifiers/>;`_",
"which apply to the project."
]
},
"urls": {
"type": "object",
"description": "URLs associated with the project in the form ``label => value``.",
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "string",
"format": "url"
}
}
},
"scripts": {
"$id": "#/definitions/entry-point-group",
"title": "Entry-points",
"type": "object",
"$$description": [
"Entry-points are grouped together to indicate what sort of capabilities they",
"provide.",
"See the `packaging guides",
"<https://packaging.python.org/specifications/entry-points/>;`_",
"and `setuptools docs",
"<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>;`_",
"for more information."
],
"propertyNames": {
"format": "python-entrypoint-name"
},
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "string",
"$$description": [
"Reference to a Python object. It is either in the form",
"``importable.module``, or ``importable.module:object.attr``."
],
"format": "python-entrypoint-reference",
"$comment": "https://packaging.python.org/specifications/entry-points/"
}
}
},
"gui-scripts": {
"$id": "#/definitions/entry-point-group",
"title": "Entry-points",
"type": "object",
"$$description": [
"Entry-points are grouped together to indicate what sort of capabilities they",
"provide.",
"See the `packaging guides",
"<https://packaging.python.org/specifications/entry-points/>;`_",
"and `setuptools docs",
"<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>;`_",
"for more information."
],
"propertyNames": {
"format": "python-entrypoint-name"
},
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "string",
"$$description": [
"Reference to a Python object. It is either in the form",
"``importable.module``, or ``importable.module:object.attr``."
],
"format": "python-entrypoint-reference",
"$comment": "https://packaging.python.org/specifications/entry-points/"
}
}
},
"entry-points": {
"$$description": [
"Instruct the installer to expose the given modules/functions via",
"``entry-point`` discovery mechanism (useful for plugins).",
"More information available in the `Python packaging guide",
"<https://packaging.python.org/specifications/entry-points/>;`_."
],
"propertyNames": {
"format": "python-entrypoint-group"
},
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"$id": "#/definitions/entry-point-group",
"title": "Entry-points",
"type": "object",
"$$description": [
"Entry-points are grouped together to indicate what sort of capabilities they",
"provide.",
"See the `packaging guides",
"<https://packaging.python.org/specifications/entry-points/>;`_",
"and `setuptools docs",
"<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>;`_",
"for more information."
],
"propertyNames": {
"format": "python-entrypoint-name"
},
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "string",
"$$description": [
"Reference to a Python object. It is either in the form",
"``importable.module``, or ``importable.module:object.attr``."
],
"format": "python-entrypoint-reference",
"$comment": "https://packaging.python.org/specifications/entry-points/"
}
}
}
}
},
"dependencies": {
"type": "array",
"description": "Project (mandatory) dependencies.",
"items": {
"$id": "#/definitions/dependency",
"title": "Dependency",
"type": "string",
"description": "Project dependency specification according to PEP 508",
"format": "pep508"
}
},
"optional-dependencies": {
"type": "object",
"description": "Optional dependency for the project",
"propertyNames": {
"format": "pep508-identifier"
},
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "array",
"items": {
"$id": "#/definitions/dependency",
"title": "Dependency",
"type": "string",
"description": "Project dependency specification according to PEP 508",
"format": "pep508"
}
}
}
},
"dynamic": {
"type": "array",
"$$description": [
"Specifies which fields are intentionally unspecified and expected to be",
"dynamically provided by build tools"
],
"items": {
"enum": [
"version",
"description",
"readme",
"requires-python",
"license",
"authors",
"maintainers",
"keywords",
"classifiers",
"urls",
"scripts",
"gui-scripts",
"entry-points",
"dependencies",
"optional-dependencies"
]
}
}
},
"required": [
"name"
],
"additionalProperties": false,
"if": {
"not": {
"required": [
"dynamic"
],
"properties": {
"dynamic": {
"contains": {
"const": "version"
},
"$$description": [
"version is listed in ``dynamic``"
]
}
}
},
"$$comment": [
"According to :pep:`621`:",
" If the core metadata specification lists a field as \"Required\", then",
" the metadata MUST specify the field statically or list it in dynamic",
"In turn, `core metadata`_ defines:",
" The required fields are: Metadata-Version, Name, Version.",
" All the other fields are optional.",
"Since ``Metadata-Version`` is defined by the build back-end, ``name`` and",
"``version`` are the only mandatory information in ``pyproject.toml``.",
".. _core metadata: https://packaging.python.org/specifications/core-metadata/"
]
},
"then": {
"required": [
"version"
],
"$$description": [
"version should be statically defined in the ``version`` field"
]
},
"definitions": {
"author": {
"$id": "#/definitions/author",
"title": "Author or Maintainer",
"$comment": "https://www.python.org/dev/peps/pep-0621/#authors-maintainers",
"type": "object",
"properties": {
"name": {
"type": "string",
"$$description": [
"MUST be a valid email name, i.e. whatever can be put as a name, before an",
"email, in :rfc:`822`."
]
},
"email": {
"type": "string",
"format": "idn-email",
"description": "MUST be a valid email address"
}
}
},
"entry-point-group": {
"$id": "#/definitions/entry-point-group",
"title": "Entry-points",
"type": "object",
"$$description": [
"Entry-points are grouped together to indicate what sort of capabilities they",
"provide.",
"See the `packaging guides",
"<https://packaging.python.org/specifications/entry-points/>;`_",
"and `setuptools docs",
"<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>;`_",
"for more information."
],
"propertyNames": {
"format": "python-entrypoint-name"
},
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "string",
"$$description": [
"Reference to a Python object. It is either in the form",
"``importable.module``, or ``importable.module:object.attr``."
],
"format": "python-entrypoint-reference",
"$comment": "https://packaging.python.org/specifications/entry-points/"
}
}
},
"dependency": {
"$id": "#/definitions/dependency",
"title": "Dependency",
"type": "string",
"description": "Project dependency specification according to PEP 508",
"format": "pep508"
}
}
}
Traceback (most recent call last):
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/bdube/miniconda3/envs/neos/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
return self._get_build_requires(
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
self.run_setup()
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(code, locals())
File "<string>", line 4, in <module>
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 151, in setup
dist.parse_config_files()
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 868, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 58, in apply_configuration
config = read_configuration(filepath, True, ignore_option_errors, dist)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 122, in read_configuration
validate(subset, filepath)
File "/private/var/folders/82/rq6mxvbx2jsdhmzdmk90c5jh0000gq/T/pip-build-env-pgypnloy/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 47, in validate
raise error from None
ValueError: invalid pyproject.toml config: `project`
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Scrolling through this wall of, frankly, non-information, I eventually find that the same blog post that lead me astray on the format of authors lead me astray on homepage, etc, as well. I paste all of these error messages in here inline so you can get the same “wow that’s a load of useless text” that is the user experience getting these errors. Checking the clock, we’re now about three hours into me trying to convert a working setup.cfg into a pyproject.toml, just so that I can locally install my own code. This is an absolute usability disaster. The “no documentation” problem is no different to the way it was back in the days you had to read setuptools’ (or distutils) cryptic documentation. If pyproject.toml is not read, and as best I can tell it is a moving target for users, please do not force it on people by breaking setuptools. My time is my employer’s money, and mucking about in thousands of lines of cryptic error messages is a good use of neither.
Please, I implore you, either retract pyproject.toml until it is actually working, un break setuptools for alternatives like setup.cfg, or improve the documentation. Maybe all three.

