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

Pyproject metadata #2588

Merged
merged 6 commits into from
Feb 25, 2025
Merged

Pyproject metadata #2588

merged 6 commits into from
Feb 25, 2025

Conversation

phw
Copy link
Member

@phw phw commented Feb 25, 2025

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

This is one step in the goal to nove package metadata into pyproject.toml and reduce code in setup.py.

Solution

  • Define [project] section in pyproject.toml and declare package metadata there. Remove the corresponding data from setup.py
  • Remove obsolete code from setup.py
  • Define setuptools package and extension in pyproject.toml and remove custom code from setup.py
  • Unified the short app description to be the same in Python package metadata and appstream metadata.

Not handled here:

  • Requirements are still defined in requirements.txt and read from there. This can be changed once we move to e.g. ruff
  • Entry points: This is currently highly system dependent and for now handled dynamically by setup.py.
  • Data files: Handling of locale translation files will be changed and done in a separate PR. The additional handling for system wide assets (which are not directly loaded by the application) on Unix systems (.desktop file, app icon, appstream metadata) will most likely stay in setup.py as part of the packaging process.
  • Custom commands in setup.py: In he future those could be moved to a separate task handler, at least the ones that are not invoked during build. Custom commands that are invoked during build likely better stay in setup.py to avoid additional build-time dependencies.

@phw phw force-pushed the pyproject-metadata branch from 2ffda54 to 169ad25 Compare February 25, 2025 11:54
@phw phw requested a review from zas February 25, 2025 12:13
@phw phw force-pushed the pyproject-metadata branch from bc11c75 to ecab83f Compare February 25, 2025 12:30
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

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

LGTM

@phw phw merged commit cb5a297 into metabrainz:master Feb 25, 2025
50 checks passed
@phw phw deleted the pyproject-metadata branch February 25, 2025 13:06
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