Skip to content

Conversation

@mhucka
Copy link
Collaborator

@mhucka mhucka commented Nov 18, 2025

This addresses deprecation warnings originating from the use of outdated setuptools functions. I took this opportunity to modernize the package definition in accordance with current Python packaging standards (PEP 621).

Key changes include:

  • All declarative package metadata (e.g., name, version, dependencies, author, classifiers) has been moved from setup.py to pyproject.toml.
  • The setup.py file has been simplified to only contain the logic necessary for building the C++ extensions.
  • The deprecated self.distribution.get_version() method has been replaced with a direct use of the __version__ variable.
  • The py.typed marker file is now correctly included in the package via the [tool.setuptools.package-data] configuration in pyproject.toml.

This should fix #839 and also set the stage for using pyproject.toml to add more metadata and project configuration settings.

(I used Jules to help with this.)

@github-actions github-actions bot added the size: M 50< lines changed <250 label Nov 18, 2025
The modern approach is to put more things into `pyproject.toml`. This
moves most things out of `setup.py`, with the exception of the native
code extensions parts, and the version number. (Still to do: figure out
how to move the version number too.)
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modernizes the project's packaging by migrating metadata from setup.py to pyproject.toml in line with PEP 621. The changes are well-executed and correctly move dependencies, project information, and other configurations. My main feedback is to eliminate the duplication of the version string, which is currently present in both pyproject.toml and setup.py. By fetching the version from the distribution metadata within setup.py, you can make pyproject.toml the single source of truth for the version, which improves maintainability and prevents potential inconsistencies.

@mhucka mhucka changed the title Fix(deps): Modernize packaging to fix setuptools deprecations Move most setup.py configuration and metadata into pyproject.toml Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: M 50< lines changed <250

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix use of deprecated setuptools functions

1 participant