Skip to content

Conversation

@abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Jun 16, 2022

This PR is a continuation of the work done to implement PEP 660.

The main objective of this PR is to add support for config_settings to select which mode is going to be used by the build_editable hook.

But since I was already working with it and adding some tests, I ended up fixing other some other items.

Summary of changes

  • Improvements in terms of the handling of config_settings:

    • Allow frontends and installers to select the strict editable mode via the config_settings argument passed to the PEP 660 hooks.
      Now users should be able to run:

      pip install -e . --config-settings editable-mode=strict
    • Separate config settings given by --global-option and --build-option. The motivation (and approach) for this change is described in build_meta:__legacy__ config_settings not compatible with pip options #1928.
      When calling setuptools internal commands --global-option is placed before the command name, while --build-option is placed after.
      For the time being the implementation strives to maintain backwards compatibility, however passing all arbitrary arguments via --global-option is now deprecated (a warning is issued).

  • Added tests for using config_settings via PEP 660 interface, which also lead to some bug fixing.

  • Added "informational warnings" about off-band link tree repository for strict installs.

Closes

Pull Request Checklist

@abravalheri abravalheri marked this pull request as ready for review June 17, 2022 10:55
@abravalheri abravalheri merged commit 66538d8 into pypa:feature/pep660 Jun 17, 2022
@abravalheri abravalheri deleted the handle-config-settings branch June 17, 2022 15:43
stanislavlevin added a commit to stanislavlevin/pyproject_installer that referenced this pull request Nov 17, 2022
As of 64.0.0 `setuptools` deprecated usage of `--global-option`. https://setuptools.pypa.io/en/latest/history.html#v64-0-0 https://setuptools.pypa.io/en/latest/history.html#deprecations: > [#3380](pypa/setuptools#3380): Passing some types of parameters via --global-option to setuptools [PEP 517](https://peps.python.org/pep-0517/)/[PEP 660](https://peps.python.org/pep-0660/) 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). > > Both --build-option and --global-option are supported as a transitional effort (a.k.a. “escape hatch”). In the future a proper list of allowed config_settings may be created. Fixes: #17 Signed-off-by: Stanislav Levin <slev@altlinux.org>
stanislavlevin added a commit to stanislavlevin/pyproject_installer that referenced this pull request Nov 17, 2022
As of 64.0.0 `setuptools` deprecated usage of `--global-option`. https://setuptools.pypa.io/en/latest/history.html#v64-0-0 https://setuptools.pypa.io/en/latest/history.html#deprecations: > [#3380](pypa/setuptools#3380): Passing some types of parameters via --global-option to setuptools [PEP 517](https://peps.python.org/pep-0517/)/[PEP 660](https://peps.python.org/pep-0660/) 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). > > Both --build-option and --global-option are supported as a transitional effort (a.k.a. “escape hatch”). In the future a proper list of allowed config_settings may be created. Fixes: #17 Signed-off-by: Stanislav Levin <slev@altlinux.org>
stanislavlevin added a commit to stanislavlevin/pyproject_installer that referenced this pull request Nov 17, 2022
As of 64.0.0 `setuptools` deprecated usage of `--global-option`. https://setuptools.pypa.io/en/latest/history.html#v64-0-0 https://setuptools.pypa.io/en/latest/history.html#deprecations: > [#3380](pypa/setuptools#3380): Passing some types of parameters via --global-option to setuptools [PEP 517](https://peps.python.org/pep-0517/)/[PEP 660](https://peps.python.org/pep-0660/) 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). > > Both --build-option and --global-option are supported as a transitional effort (a.k.a. “escape hatch”). In the future a proper list of allowed config_settings may be created. Fixes: #17 Signed-off-by: Stanislav Levin <slev@altlinux.org>
aplaice added a commit to aplaice/dulwich that referenced this pull request May 23, 2023
See: jelmer#1093. Currently, both --global-option=--pure and --build-option=--pure work (when set in --config-settings). However, using --global-option in this way is considered deprecated: https://setuptools.pypa.io/en/latest/history.html#id139 pypa/setuptools#3380 --no-binary is needed to prevent pip installing the pre-built wheels from pypi.org.
mkoeppe added a commit to mkoeppe/sage that referenced this pull request Apr 17, 2024
mkoeppe added a commit to mkoeppe/sage that referenced this pull request Apr 27, 2024
mkoeppe added a commit to mkoeppe/sage that referenced this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant