setuptools icon indicating copy to clipboard operation
setuptools copied to clipboard

[BUG] editable mode have no precedence over system installed package

Open hoba87 opened this issue 2 years ago • 1 comments

setuptools version

67.1.0

Python version

3.7

OS

CentOS 8

Additional environment information

No response

Description

Not sure if this is a bug or a problem that can be solved. However, for my python installation there is a system package dir and a local user dir, where packages are installed. In the system dir there is a package installed at let say version 1.0. In the user directory the package is installed at version 1.2. With the usual non-editable mode, this is working as expected, that the user installed package takes precedence over the system installed package. But when installed in editable mode in the local user directory, the system installed package takes precedence.

Expected behavior

Editable package installs in local user directory should takes precedence over non-editable system directory installs.

How to Reproduce

cd package_source_1_0 pip install . (as root) cd package_source_1_2 pip install -e . (as user)

python3 import importlib_metadata print(importlib_metadata.version(package)

Output


hoba87 avatar Feb 02 '23 13:02 hoba87

As a workaround for my case, I found that installing with either pip install -e . --config-settings editable_mode=compat or pip install -e . --config-settings editable_mode=strict uses a plain .pth approach that respects expected precedence.

mnmelo avatar Nov 30 '23 00:11 mnmelo