Skip to content

Commit 6177722

Browse files
committed
Document edge cases
1 parent 9c8e74b commit 6177722

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pip/_internal/req/req_install.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ def __init__(
151151
self.hash_options = hash_options if hash_options else {}
152152
self.config_settings = config_settings
153153
if isinstance(comes_from, InstallRequirement) and comes_from.config_settings:
154+
# 1. If a user-requested package has config settings, those are always used.
155+
# 2. If a user-requested package does not have user-specified config
156+
# settings, but is another package’s transitive dependency, it would
157+
# inherit the dependant’s config settings.
158+
# 3. A transitive cannot have user-specified config settings.
159+
# 4. If a transitive dependency’s dependant has config settings,
160+
# the config settings are inherited.
154161
self.config_settings = comes_from.config_settings
155162
# Set to True after successful preparation of this requirement
156163
self.prepared = False

0 commit comments

Comments
 (0)