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

[tests] usage of setuptools' build-option passed as global-option #59

Closed
stanislavlevin opened this issue Dec 5, 2023 · 0 comments · Fixed by #60
Closed

[tests] usage of setuptools' build-option passed as global-option #59

stanislavlevin opened this issue Dec 5, 2023 · 0 comments · Fixed by #60

Comments

@stanislavlevin
Copy link
Owner

stanislavlevin commented Dec 5, 2023

As of setuptools 69:

https://setuptools.pypa.io/en/stable/history.html#v69-0-0

Passing config_settings to setuptools.build_meta with deprecated
values for --global-option is no longer allowed. (pypa/setuptools#4066)

This leads to a test failure:

FAILED tests/integration/test_config_settings.py::test_config_settings_setuptools - subprocess.CalledProcessError: Command '['/tmp/pytest-of-runner/pytest-0/test_config_settings_setuptool0/venv/bin/python', '-m', 'pyproject_installer', 'build', '--backend-config-settings', '{"--global-option": ["--python-tag=test_tag", "--build-number=123", "--plat-name=test_plat"]}', '--outdir', PosixPath('/tmp/pytest-of-runner/pytest-0/test_config_settings_setuptool0/dist')]' returned non-zero exit status 1.
============== 1 failed, 9 passed, 1 xfailed in 71.14s (0:01:11) ===============

...

Captured stdout:

INFO     : Calling hook build_wheel in subprocess
INFO     : Build backend: setuptools.build_meta
INFO     : Hook args: ['/tmp/pytest-of-runner/pytest-0/test_config_settings_setuptool0/dist']
INFO     : Hook kwargs: {'config_settings': {'--global-option': ['--python-tag=test_tag', '--build-number=123', '--plat-name=test_plat']}}


Captured stderr:

usage: backend_caller.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: backend_caller.py --help [cmd1 cmd2 ...]
   or: backend_caller.py --help-commands
   or: backend_caller.py cmd --help

error: option --python-tag not recognized
stanislavlevin added a commit that referenced this issue Dec 5, 2023
It was deprecated as of 64.0.0 `setuptools`:

https://setuptools.pypa.io/en/latest/history.html#v64-0-0
> #3380: Passing some types of parameters via --global-option to
  setuptools PEP 517/PEP 660 backend is now considered deprecated. The
  user can pass the same arbitrary parameter via --build-option
  (--global-option is now reserved for flags like --verbose or --quiet).

And was removed in 69.0.0:
https://setuptools.pypa.io/en/stable/history.html#v69-0-0
> Passing config_settings to setuptools.build_meta with deprecated
  values for --global-option is no longer allowed. (#4066)

Fixes: #59
Signed-off-by: Stanislav Levin <slev@altlinux.org>
stanislavlevin added a commit that referenced this issue Dec 5, 2023
It was deprecated as of 64.0.0 `setuptools`:

https://setuptools.pypa.io/en/latest/history.html#v64-0-0
> #3380: Passing some types of parameters via --global-option to
  setuptools PEP 517/PEP 660 backend is now considered deprecated. The
  user can pass the same arbitrary parameter via --build-option
  (--global-option is now reserved for flags like --verbose or --quiet).

And was removed in 69.0.0:
https://setuptools.pypa.io/en/stable/history.html#v69-0-0
> Passing config_settings to setuptools.build_meta with deprecated
  values for --global-option is no longer allowed. (#4066)

Fixes: #59
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant