Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made values dynamic in pyproject.toml #135

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

mo-lucy-gordon
Copy link
Contributor

Fixes issue #134

When trying to install stylist, pip was throwing errors because certain values weren’t listed as “dynamic” in the pyproject.toml file. Adding the values in question to the dynamic setting fixed the issue.

To reproduce the error you can run the following command inside your stylist repo.
pip install .

The error messages were all like so:

According to the spec (see the link below), however, setuptools CANNOT consider this value unless "readme" is listed as "dynamic".
https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
To prevent this problem, you can list "readme" under "dynamic" or alternatively remove the "[project]" table from your file and rely entirely on other means of configuration.

Copy link
Collaborator

@MatthewHambley MatthewHambley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the solution is incomplete. "readme" definitely needed to be added because it is specified as dynamic further down. On the other hand "authors" and "keywords" are not specified anywhere in the file.

I think they need to be added, either statically (in which case removed them from the dynamic list) or dynamically.

@mo-lucy-gordon
Copy link
Contributor Author

I think the solution is incomplete. "readme" definitely needed to be added because it is specified as dynamic further down. On the other hand "authors" and "keywords" are not specified anywhere in the file.

I think they need to be added, either statically (in which case removed them from the dynamic list) or dynamically.

Yes I think you're right. I tested with just the "readme" value as dynamic and it works, so I've updated the file.

Copy link
Collaborator

@MatthewHambley MatthewHambley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to go.

@MatthewHambley MatthewHambley merged commit 023640a into MetOffice:master Nov 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants