Closed Czarified closed 2 years ago
Hi @Czarified, thanks for this!
I based the structure for the project from this.
It seems like now pip
is looking for the name
metadata in pyproject.toml
, is this your take on this? This sees goes against what is stated in the above link?
Does PEP 621 remove setup.cfg
and put everything in pyproject.toml
?
I'm not enough of a python guru to quite understand what's going on here 😆
I got a bit distracted on Friday, but I was going to dig into this more. I'll do some reading and see if I can fix it. Thanks for the links!
On Sat, Mar 26, 2022, 12:14 AM Robbie van Leeuwen @.***> wrote:
Hi @Czarified https://github.com/Czarified, thanks for this!
I based the structure for the project from this https://packaging.python.org/en/latest/tutorials/packaging-projects/.
It seems like now pip is looking for the name metadata in pyproject.toml, is this your take on this? This sees goes against what is stated in the above link?
Does PEP 621 https://peps.python.org/pep-0621/ remove setup.cfg and put everything in pyproject.toml?
I'm not enough of a python guru to quite understand what's going on here 😆
— Reply to this email directly, view it on GitHub https://github.com/robbievanleeuwen/section-properties/issues/208#issuecomment-1079607778, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVBQOVPB227MV3CIFTYRJLVB2MJTANCNFSM5RUNNQBQ . You are receiving this because you were mentioned.Message ID: @.***>
So I think there's a couple things here. PEP621 does seem to allow metadata definitions in the pyproject.toml, however we area already using a setup.cfg for static metadata. I don't see a need to refactor for that.
Part of using a setup.cfg for static metadata means that we don't need a setup.py file anymore.
And finally, the pyproject.toml doesn't need the information outside of the [build-system]
table. My theory is that including more categories (which overlap with the setup.cfg), confuses pip when it tries to install the directory. I'm kinda surprised that build worked...
I'll submit a PR later today. I'd love to get confirmation from @connorferster and/or @Spectre5. I know Spectre wants to move to a Poetry-based build, and maybe we'll get there! For starters, we at least should clean up what we have. Defining the "boring" static metadata in the pyproject.toml (according to PEP621) would more easily allow switching of build systems in the future.
Describe the bug Pip errors out when attempting to install a local branch. Pyproject.toml has invalid fields.
To Reproduce Steps to reproduce the behaviour:
pip install --upgrade pip
Expected behaviour Should install the local repo in "editable" mode, using the pyproject.toml and setup.cfg to gather and install dependencies.
Screenshots
Desktop (please complete the following information):
Additional Traceback Information
LONG traceback...
``` (section-properties) C:\Users\bcrews\Documents\GitHub\section-properties>pip list Package Version ---------- ------- pip 22.0.4 setuptools 47.1.0 (section-properties) C:\Users\bcrews\Documents\GitHub\section-properties>pip install -e . Obtaining file:///C:/Users/bcrews/Documents/GitHub/section-properties Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [515 lines of output] C:\Users\bcrews\AppData\Local\Temp\pip-build-env-_44d8lae\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py:100: _ExperimentalProjectMetadata: Support for project metadata in `pyproject.toml` is still experimental and may be removed (or change) in future releases. warnings.warn(msg, _ExperimentalProjectMetadata) configuration error: `project` must contain ['name'] properties DESCRIPTION: Data structure for the **project** table inside ``pyproject.toml`` (as initially defined in :pep:`621`) GIVEN VALUE: { "requires-python": ">=3.7,<3.10" } OFFENDING RULE: 'required' 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", "