Skip to content

Commit e367c00

Browse files
committed
Clarify the role of the egg URL fragment
1 parent 8dbb8b9 commit e367c00

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

docs/html/topics/vcs-support.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,13 @@ option.
136136

137137
## URL fragments
138138

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

141-
- `egg`: For specifying the "project name" for use in pip's dependency
142-
resolution logic. eg: `egg=project_name`
143-
- `subdirectory`: For specifying the path to the Python package, when it is not
144-
in the root of the VCS directory. eg: `pkg_dir`
142+
pip also looks at the `egg` fragment specifying the "project name". In practice the
143+
`egg` fragment is only required to help pip determine the VCS clone location in editable
144+
mode. In all other circumstance the `egg` fragment is not necessary and its use is
145+
discouraged.
145146

146147
````{admonition} Example
147148
If your repository layout is:
@@ -157,6 +158,12 @@ some_other_file
157158
158159
Then, to install from this repository, the syntax would be:
159160
161+
```{pip-cli}
162+
$ pip install "pkg @ vcs+protocol://repo_url/#subdirectory=pkg_dir"
163+
```
164+
165+
or:
166+
160167
```{pip-cli}
161168
$ pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
162169
```

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)