[Python]Compatible with setuptools>=72
Closed this issue · 3 comments
anyidea commented
see issue: setuptools
Python package: setuptools change released on 72.0 breaks the default build isolation build of many packages since many of these packages do not pin on a particular setuptools version.
setuptools
>= v72 removes setuptools.command.test
- Installing jsbeautifier (1.15.1): Failed
ChefBuildError
Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Traceback (most recent call last):
File "/Users/aidenlu/.local/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/aidenlu/.local/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/aidenlu/.local/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/wz/kqw652sx28j0zhdrhln3s6h80000gn/T/tmp4yqgsyc9/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/wz/kqw652sx28j0zhdrhln3s6h80000gn/T/tmp4yqgsyc9/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/private/var/folders/wz/kqw652sx28j0zhdrhln3s6h80000gn/T/tmp4yqgsyc9/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/private/var/folders/wz/kqw652sx28j0zhdrhln3s6h80000gn/T/tmp4yqgsyc9/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 9, in <module>
ModuleNotFoundError: No module named 'setuptools.command.test'
at ~/.local/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/installation/chef.py:164 in _prepare
160│
161│ error = ChefBuildError("\n\n".join(message_parts))
162│
163│ if error is not None:
→ 164│ raise error from None
165│
166│ return path
167│
168│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with jsbeautifier (1.15.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "jsbeautifier (==1.15.1)"'.
josephd-envsys commented
Related issue: #2300
cclauss commented
This issue was fixed upstream https://pypi.org/project/setuptools/#history
However, #2304 is still a useful improvement.