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

Move project metadata to pyproject.toml #155

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Conversation

jeanas
Copy link
Member

@jeanas jeanas commented Mar 2, 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 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.

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.
Copy link
Member

@fedelibre fedelibre left a 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

pyproject.toml Outdated Show resolved Hide resolved
@jeanas
Copy link
Member Author

jeanas commented Mar 3, 2023

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.

@jeanas jeanas merged commit c9064ca into frescobaldi:master Mar 3, 2023
@jeanas jeanas deleted the pyproject branch March 3, 2023 17:39
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants