Fix a few packaging details (PEP 639)#684
Merged
Merged
Conversation
Fixes a warning pointing to this webpage: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
9ceb0d1 to
1d517f5
Compare
ilius
reviewed
Oct 22, 2025
| keywords = ["dictionary", "glossary"] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", |
Owner
There was a problem hiding this comment.
There are lots of these lines on Github. Why do we have to remove it?
Contributor
Author
There was a problem hiding this comment.
TBH, I'm not an expert in Python packaging, but I have a bit of experience and it seems counter productive that there are both pyproject.toml and a setup.py. Nowadays, you should be able to get along with only the first. Without this removal, with Nixpkgs' packaging which uses pypa/build, we get the error:
pypa build flags: --no-isolation --outdir dist/ --wheel
* Getting build dependencies for wheel...
/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsWarning: `license` overwritten by `pyproject.toml`
corresp(dist, value, root_dir)
/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsWarning: `extras_require` overwritten in `pyproject.toml` (optional-dependencies)
corresp(dist, value, root_dir)
Traceback (most recent call last):
File "/nix/store/436hp1arg079l5q1l5pifk6mzzj4bcwn-python3.13-pyproject-hooks-1.2.0/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
~~~~^^
File "/nix/store/436hp1arg079l5q1l5pifk6mzzj4bcwn-python3.13-pyproject-hooks-1.2.0/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/436hp1arg079l5q1l5pifk6mzzj4bcwn-python3.13-pyproject-hooks-1.2.0/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 121, in <module>
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/__init__.py", line 115, in setup
return distutils.core.setup(**attrs)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 160, in setup
dist.parse_config_files()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/dist.py", line 756, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/pyprojecttoml.py", line 73, in apply_configuration
return _apply(dist, config, filepath)
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 61, in apply
dist._finalize_license_expression()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/nix/store/a53syg4q2wk1jhw24gqnib37pkgacndy-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/dist.py", line 430, in _finalize_license_expression
raise InvalidConfigError(
...<3 lines>...
)
setuptools.errors.InvalidConfigError: License classifiers have been superseded by license expressions (see https://peps.python.org/pep-0639/). Please remove:
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
This file contains hidden or 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
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.
While trying to package this wonderful program to Nixpkgs, I encountered the need for these 2 changes.
Reference: