pip icon indicating copy to clipboard operation
pip copied to clipboard

How to use the `` --config-settings`` on the requirements

Open Tiarles opened this issue 11 months ago • 1 comments

Description

Our organization has several local packages that are installed in editable mode. After updating setuptools and replacing the setup.py files for pyproject.toml the --config-settings is used to specify that editable_mode=compat. This was done because these local packages write each other's paths adding more functionalities for the already installed ones and, for some reason, without this option it doesn`t work.

I would like to understand what could have changed to the editable mode installation and more importantly, if is a bug or if there is other ways to add the --config-settings option in the requirements file. Currently the lines (below) in the requirements file just instalmy_local_dependency folder as editable but not considering the setting --config-settings editable_mode=compat.

-e ./../my_local_dependency/ --config-settings editable_mode=compat

Expected behavior

The installation through the requirements file works in the same way when calling through the command line (below).

pip install -e ./../my_local_dependency/ --config-settings editable_mode=compat

pip version

23.1.2

Python version

3.11.4

OS

Windows

How to Reproduce

  1. Try to install a package in editable mode through the requirements file, it can be seen through the console log that the --config-settings is not considered for the installation process.
# The `requirements` file
-e ./../my_local_dependency/ --config-settings editable_mode=compat

And in command line:

pip install -r requirements

It can be provided a more explanatory example but I would like to have first a feedback for my questions.

Output

No response

Code of Conduct

Tiarles avatar Mar 19 '24 15:03 Tiarles

@Tiarles

I think your syntax might be slightly wrong. The requirements.txt file should contain,

-e ./../my_local_dependency/ --config-settings=editable_mode=compat

(Note the = after --config-settings.)

ferdnyc avatar May 04 '24 06:05 ferdnyc

Sorry, for the delay. I got an intern that consumed my time and the wish to be alive.

I try as suggested here:

@Tiarles

I think your syntax might be slightly wrong. The requirements.txt file should contain,

-e ./../my_local_dependency/ --config-settings=editable_mode=compat

(Note the = after --config-settings.)

However, the behavior of the final installation with all modules wasn't the same as executing the installation directly on the terminal. As soon I create an example that reproduces my case I will reply here,

Tiarles avatar Oct 02 '24 13:10 Tiarles

Unfortunately, I wasn`t able to reproduce this issue. Only in our internal repo, we are now using uv as a package manager, and this type of installation is still unavailable there.

Tiarles avatar Oct 08 '24 09:10 Tiarles