Skip to content

Commit fb02491

Browse files
authored
Merge pull request #11676 from sbidoul/clarify-egg-fragment-docs-sbi
2 parents b224c38 + 668ea3f commit fb02491

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

docs/html/topics/vcs-support.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ take on the VCS requirement (not the commit itself).
132132

133133
## URL fragments
134134

135-
pip looks at 2 fragments for VCS URLs:
135+
pip looks at the `subdirectory` fragments of VCS URLs for specifying the path to the
136+
Python package, when it is not in the root of the VCS directory. eg: `pkg_dir`.
136137

137-
- `egg`: For specifying the "project name" for use in pip's dependency
138-
resolution logic. e.g.: `egg=project_name`
138+
pip also looks at the `egg` fragment specifying the "project name". In practice the
139+
`egg` fragment is only required to help pip determine the VCS clone location in editable
140+
mode. In all other circumstances, the `egg` fragment is not necessary and its use is
141+
discouraged.
139142

140-
The `egg` fragment **should** be a bare
141-
[PEP 508](https://peps.python.org/pep-0508/) project name. Anything else
142-
is not guaranteed to work.
143-
144-
- `subdirectory`: For specifying the path to the Python package, when it is not
145-
in the root of the VCS directory. e.g.: `pkg_dir`
143+
The `egg` fragment **should** be a bare
144+
[PEP 508](https://peps.python.org/pep-0508/) project name. Anything else
145+
is not guaranteed to work.
146146

147147
````{admonition} Example
148148
If your repository layout is:
@@ -158,6 +158,12 @@ some_other_file
158158
159159
Then, to install from this repository, the syntax would be:
160160
161+
```{pip-cli}
162+
$ pip install "pkg @ vcs+protocol://repo_url/#subdirectory=pkg_dir"
163+
```
164+
165+
or:
166+
161167
```{pip-cli}
162168
$ pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
163169
```

news/11676.doc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Clarify that the egg URL fragment is only necessary for editable VCS installs, and
2+
otherwise not necessary anymore.

0 commit comments

Comments
 (0)