-
Notifications
You must be signed in to change notification settings - Fork 252
Fix a few packaging details (PEP 639) #684
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
Conversation
9ceb0d1 to
1d517f5
Compare
| keywords = ["dictionary", "glossary"] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", |
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.
There are lots of these lines on Github. Why do we have to remove it?
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.
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
While trying to package this wonderful program to Nixpkgs, I encountered the need for these 2 changes.
Reference: