-
Notifications
You must be signed in to change notification settings - Fork 35
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
Move project metadata to pyproject.toml #155
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modern Python packaging standards rely on static metadata in pyproject.toml rather than dynamic metadata in setup.py, which is considered deprecated. Porting notes: - In modern packaging, console scripts are installed via entry points. The bin/ directory containing the ly and ly-server scripts is removed; instead, entry points specify a module and function to run, and pip automatically creates a wrapper script when installing the project. - The pkginfo is trimmed down to contain only the version. This is because pyproject.toml is not Python code, and the ways in which it can read metadata dynamically are limited. The conf.py file for Sphinx now declares the metadata as well; this might be considered duplication, but things like the name 'python-ly' and the author 'Wilbert Berendsen' are unlikely to change. - There are now a few more URLs in the [project.urls] table. - This does not use setuptools_scm to display the version, but that could be done in the future (see frescobaldi#148). However, getting the version for conf.py needs having the package installed, so this will impose certain constraints for developers. - This change was tested by executing "python -m build" before and after, unpacking the sdists, and checking that the differences were intended.
fedelibre
reviewed
Mar 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart the oversight, LGTM
I have several dependent changes, so now that @fedelibre has reviewed this, I will merge it, as there seemed to be agreement for pyproject.toml in frescobaldi/frescobaldi#1518. |
ksnortum
pushed a commit
to ksnortum/python-ly
that referenced
this pull request
Jul 7, 2023
Modern Python packaging standards rely on static metadata in pyproject.toml rather than dynamic metadata in setup.py, which is considered deprecated. Porting notes: - In modern packaging, console scripts are installed via entry points. The bin/ directory containing the ly and ly-server scripts is removed; instead, entry points specify a module and function to run, and pip automatically creates a wrapper script when installing the project. - The pkginfo is trimmed down to contain only the version. This is because pyproject.toml is not Python code, and the ways in which it can read metadata dynamically are limited. The conf.py file for Sphinx now declares the metadata as well; this might be considered duplication, but things like the name 'python-ly' and the author 'Wilbert Berendsen' are unlikely to change. - There are now a few more URLs in the [project.urls] table. - This does not use setuptools_scm to display the version, but that could be done in the future (see frescobaldi#148). However, getting the version for conf.py needs having the package installed, so this will impose certain constraints for developers. - This change was tested by executing "python -m build" before and after, unpacking the sdists, and checking that the differences were intended.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modern Python packaging standards rely on static metadata in pyproject.toml rather than dynamic metadata in setup.py, which is considered deprecated.
Porting notes:
In modern packaging, console scripts are installed via entry points. The bin/ directory containing the ly and ly-server scripts is removed; instead, entry points specify a module and function to run, and pip automatically creates a wrapper script when installing the project.
The pkginfo is trimmed down to contain only the version. This is because pyproject.toml is not Python code, and the ways in which it can read metadata dynamically are limited. The conf.py file for Sphinx now declares the metadata as well; this might be considered duplication, but things like the name 'python-ly' and the author 'Wilbert Berendsen' are unlikely to change.
There are now a few more URLs in the [project.urls] table.
This does not use setuptools_scm to display the version, but that could be done in the future (see Add git commit sha to displayed version (useful when running from source) #148). However, getting the version for conf.py needs having the package installed, so this will impose certain constraints for developers.
This change was tested by executing "python -m build" before and after, unpacking the sdists, and checking that the differences were intended.