@@ -132,17 +132,17 @@ take on the VCS requirement (not the commit itself).
132
132
133
133
## URL fragments
134
134
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 ` .
136
137
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.
139
142
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.
146
146
147
147
```` {admonition} Example
148
148
If your repository layout is:
@@ -158,6 +158,12 @@ some_other_file
158
158
159
159
Then, to install from this repository, the syntax would be:
160
160
161
+ ```{pip-cli}
162
+ $ pip install "pkg @ vcs+protocol://repo_url/#subdirectory=pkg_dir"
163
+ ```
164
+
165
+ or:
166
+
161
167
```{pip-cli}
162
168
$ pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
163
169
```
0 commit comments