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

[Python]Compatible with setuptools>=72 #2300

Closed
anyidea opened this issue Jul 29, 2024 · 3 comments
Closed

[Python]Compatible with setuptools>=72 #2300

anyidea opened this issue Jul 29, 2024 · 3 comments

Comments

@anyidea
Copy link

anyidea commented Jul 29, 2024

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)"'.
@anyidea anyidea changed the title support setuptools>=72 [Python]Support setuptools>=72 Jul 29, 2024
@anyidea anyidea changed the title [Python]Support setuptools>=72 [Python]Compatible with setuptools>=72 Jul 29, 2024
@cclauss
Copy link

cclauss commented Jul 29, 2024

@josephd-envsys
Copy link

Related issue: #2300

cjwatson added a commit to cjwatson/js-beautify that referenced this issue Jul 29, 2024
`make pytest` already runs a superset of all the tests run by `python3
setup-css.py test` and `python3 setup-js.py test`.  (The former didn't
work anyway due to a typo.)

Fixes: beautifier#2300, 2301
cjwatson added a commit to cjwatson/js-beautify that referenced this issue Jul 29, 2024
`make pytest` already runs a superset of all the tests run by `python3
setup-css.py test` and `python3 setup-js.py test`.  (The former didn't
work anyway due to a typo.)

Fixes: beautifier#2300, beautifier#2301
@cclauss
Copy link

cclauss commented Jul 31, 2024

This issue was fixed upstream https://pypi.org/project/setuptools/#history

However, #2304 is still a useful improvement.

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

No branches or pull requests

4 participants