@@ -66,8 +66,8 @@ for the name and project version (this is in theory slightly less reliable
6666than using the ``egg_info `` command, but avoids downloading and processing
6767unnecessary numbers of files).
6868
69- Any URL may use the `` #egg=name `` syntax (see :ref: ` VCS Support `) to
70- explicitly state the project name .
69+ The :pep: ` 508 ` requirement syntax can be used to explicitly state the project
70+ name (see :ref: ` VCS Support `) .
7171
7272Satisfying Requirements
7373-----------------------
@@ -396,12 +396,13 @@ the :ref:`--editable <install_--editable>` option) or not.
396396 (referencing a specific commit) if and only if the install is done using the
397397 editable option.
398398
399- The "project name" component of the URL suffix ``egg=<project name> ``
400- is used by pip in its dependency logic to identify the project prior
401- to pip downloading and analyzing the metadata. For projects
402- where ``setup.py `` is not in the root of project, the "subdirectory" component
403- is used. The value of the "subdirectory" component should be a path starting
404- from the root of the project to where ``setup.py `` is located.
399+ The "project name" of a requirement specified by URL can be explicitly set
400+ with the :pep: `508 ` requirement syntax. This value is used by pip in its
401+ dependency logic to identify the project prior to pip downloading and analyzing
402+ the metadata. For projects where ``setup.py `` is not in the root of project,
403+ the "subdirectory" component is used. The value of the "subdirectory" component
404+ should be a path starting from the root of the project to where ``setup.py ``
405+ is located.
405406
406407If your repository layout is::
407408
@@ -418,13 +419,13 @@ Then, to install from this repository, the syntax would be:
418419
419420 .. code-block :: shell
420421
421- python -m pip install -e " vcs+protocol://repo_url/#egg=pkg& subdirectory=pkg_dir"
422+ python -m pip install -e " pkg @ vcs+protocol://repo_url/#subdirectory=pkg_dir"
422423
423424 .. tab :: Windows
424425
425426 .. code-block :: shell
426427
427- py -m pip install -e " vcs+protocol://repo_url/#egg=pkg& subdirectory=pkg_dir"
428+ py -m pip install -e " pkg @ vcs+protocol://repo_url/#subdirectory=pkg_dir"
428429
429430
430431 Git
@@ -441,17 +442,17 @@ pip currently supports cloning over ``git``, ``git+http``, ``git+https``,
441442
442443Here are the supported forms::
443444
444- [-e] git+http://git.example.com/MyProject#egg= MyProject
445- [-e] git+https://git.example.com/MyProject#egg= MyProject
446- [-e] git+ssh://git.example.com/MyProject#egg= MyProject
447- [-e] git+file:///home/user/projects/MyProject#egg= MyProject
445+ [-e] MyProject@ git+http://git.example.com/MyProject
446+ [-e] MyProject@ git+https://git.example.com/MyProject
447+ [-e] MyProject@ git+ssh://git.example.com/MyProject
448+ [-e] MyProject@ git+file:///home/user/projects/MyProject
448449
449450Passing a branch name, a commit hash, a tag name or a git ref is possible like so::
450451
451- [-e] git+https://git.example.com/MyProject.git@master#egg=MyProject
452- [-e] git+https://git.example.com/[email protected] #egg=MyProject 453- [-e] git+https://git.example.com/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject
454- [-e] git+https://git.example.com/MyProject.git@refs/pull/123/head#egg=MyProject
452+ [-e] MyProject@ git+https://git.example.com/MyProject.git@master
453+ [-e] MyProject@ git+https://git.example.com/[email protected] 454+ [-e] MyProject@ git+https://git.example.com/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709
455+ [-e] MyProject@ git+https://git.example.com/MyProject.git@refs/pull/123/head
455456
456457When passing a commit hash, specifying a full hash is preferable to a partial
457458hash because a full hash allows pip to operate more efficiently (e.g. by
@@ -467,18 +468,18 @@ The supported schemes are: ``hg+file``, ``hg+http``, ``hg+https``,
467468
468469Here are the supported forms::
469470
470- [-e] hg+http://hg.myproject.org/MyProject#egg= MyProject
471- [-e] hg+https://hg.myproject.org/MyProject#egg= MyProject
472- [-e] hg+ssh://hg.myproject.org/MyProject#egg= MyProject
473- [-e] hg+file:///home/user/projects/MyProject#egg= MyProject
471+ [-e] MyProject@ hg+http://hg.myproject.org/MyProject
472+ [-e] MyProject@ hg+https://hg.myproject.org/MyProject
473+ [-e] MyProject@ hg+ssh://hg.myproject.org/MyProject
474+ [-e] MyProject@ hg+file:///home/user/projects/MyProject
474475
475476You can also specify a revision number, a revision hash, a tag name or a local
476477branch name like so::
477478
478- [-e] hg+http://hg.example.com/MyProject@da39a3ee5e6b#egg=MyProject
479- [-e] hg+http://hg.example.com/MyProject@2019#egg=MyProject
480- [-e] hg+http://hg.example.com/[email protected] #egg=MyProject 481- [-e] hg+http://hg.example.com/MyProject@special_feature#egg=MyProject
479+ [-e] MyProject@ hg+http://hg.example.com/MyProject@da39a3ee5e6b
480+ [-e] MyProject@ hg+http://hg.example.com/MyProject@2019
481+ [-e] MyProject@ hg+http://hg.example.com/[email protected] 482+ [-e] MyProject@ hg+http://hg.example.com/MyProject@special_feature
482483
483484Subversion
484485^^^^^^^^^^
@@ -487,14 +488,14 @@ pip supports the URL schemes ``svn``, ``svn+svn``, ``svn+http``, ``svn+https``,
487488
488489Here are some of the supported forms::
489490
490- [-e] svn+https://svn.example.com/MyProject#egg= MyProject
491- [-e] svn+ssh://svn.example.com/MyProject#egg= MyProject
492- [-e] svn+ssh://[email protected] /MyProject#egg= MyProject 491+ [-e] MyProject@ svn+https://svn.example.com/MyProject
492+ [-e] MyProject@ svn+ssh://svn.example.com/MyProject
493+ [-e] MyProject@ svn+ssh://[email protected] /MyProject 493494
494495You can also give specific revisions to an SVN URL, like so::
495496
496- [-e] svn+svn://svn.example.com/svn/MyProject#egg= MyProject
497- [-e] svn+http://svn.example.com/svn/MyProject/trunk@2019#egg=MyProject
497+ [-e] MyProject@ svn+svn://svn.example.com/svn/MyProject
498+ [-e] MyProject@ svn+http://svn.example.com/svn/MyProject/trunk@2019
498499
499500which will check out revision 2019. ``@{20080101} `` would also check
500501out the revision from 2008-01-01. You can only check out specific
@@ -508,16 +509,16 @@ pip supports Bazaar using the ``bzr+http``, ``bzr+https``, ``bzr+ssh``,
508509
509510Here are the supported forms::
510511
511- [-e] bzr+http://bzr.example.com/MyProject/trunk#egg=MyProject
512- [-e] bzr+sftp://[email protected] /MyProject/trunk#egg=MyProject 513- [-e] bzr+ssh://[email protected] /MyProject/trunk#egg=MyProject 514- [-e] bzr+ftp://[email protected] /MyProject/trunk#egg=MyProject 515- [-e] bzr+lp:MyProject#egg= MyProject
512+ [-e] MyProject@ bzr+http://bzr.example.com/MyProject/trunk
513+ [-e] MyProject@ bzr+sftp://[email protected] /MyProject/trunk 514+ [-e] MyProject@ bzr+ssh://[email protected] /MyProject/trunk 515+ [-e] MyProject@ bzr+ftp://[email protected] /MyProject/trunk 516+ [-e] MyProject@ bzr+lp:MyProject
516517
517518Tags or revisions can be installed like so::
518519
519- [-e] bzr+https://bzr.example.com/MyProject/trunk@2019#egg=MyProject
520- [-e] bzr+http://bzr.example.com/MyProject/[email protected] #egg=MyProject 520+ [-e] MyProject@ bzr+https://bzr.example.com/MyProject/trunk@2019
521+ [-e] MyProject@ bzr+http://bzr.example.com/MyProject/[email protected] 521522
522523Using Environment Variables
523524^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -527,8 +528,8 @@ makes it possible to reference private repositories without having to store
527528access tokens in the requirements file. For example, a private git repository
528529allowing Basic Auth for authentication can be refenced like this::
529530
530- [-e] git+http://${AUTH_USER}:${AUTH_PASSWORD}@git.example.com/MyProject#egg= MyProject
531- [-e] git+https://${AUTH_USER}:${AUTH_PASSWORD}@git.example.com/MyProject#egg= MyProject
531+ [-e] MyProject@ git+http://${AUTH_USER}:${AUTH_PASSWORD}@git.example.com/MyProject
532+ [-e] MyProject@ git+https://${AUTH_USER}:${AUTH_PASSWORD}@git.example.com/MyProject
532533
533534.. note ::
534535
@@ -827,14 +828,14 @@ You can install local projects or VCS projects in "editable" mode:
827828 .. code-block :: shell
828829
829830 python -m pip install -e path/to/SomeProject
830- python -m pip install -e git+http://repo/my_project.git#egg=SomeProject
831+ python -m pip install -e SomeProject@ git+http://repo/my_project.git
831832
832833 .. tab :: Windows
833834
834835 .. code-block :: shell
835836
836837 py -m pip install -e path/to/SomeProject
837- py -m pip install -e git+http://repo/my_project.git#egg=SomeProject
838+ py -m pip install -e SomeProject@ git+http://repo/my_project.git
838839
839840
840841 (See the :ref: `VCS Support ` section above for more information on VCS-related syntax.)
@@ -956,7 +957,7 @@ Examples
956957
957958 py -m pip install SomePackage # latest version
958959 py -m pip install SomePackage==1.0.4 # specific version
959- py -m pip install ' SomePackage>=1.0.4' # minimum version
960+ py -m pip install " SomePackage>=1.0.4" # minimum version
960961
961962
962963 #. Install a list of requirements specified in a file. See the :ref: `Requirements files <Requirements Files >`.
@@ -1027,21 +1028,21 @@ Examples
10271028
10281029 .. code-block :: shell
10291030
1030- python -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
1031- python -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
1032- python -m python -m pip install -e svn+svn://svn.repo/some_pkg/trunk/# egg=SomePackage # from svn
1033- python -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
1034- python -m pip install -e " git+https://git.repo/some_repo.git#egg=subdir& subdirectory=subdir_path" # install a python package from a repo subdirectory
1031+ python -m pip install -e SomePackage@ git+https://git.repo/some_pkg.git # from git
1032+ python -m pip install -e SomePackage@ hg+https://hg.repo/some_pkg.git # from mercurial
1033+ python -m pip install -e SomePackage@ svn+svn://svn.repo/some_pkg/trunk/ # from svn
1034+ python -m pip install -e SomePackage@ git+https://git.repo/some_pkg.git@feature # from 'feature' branch
1035+ python -m pip install -e SomePackage@ git+https://git.repo/some_repo.git#subdirectory=subdir_path # install a python package from a repo subdirectory
10351036
10361037 .. tab :: Windows
10371038
10381039 .. code-block :: shell
10391040
1040- py -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
1041- py -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
1042- py -m pip install -e svn+svn://svn.repo/some_pkg/trunk/# egg=SomePackage # from svn
1043- py -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
1044- py -m pip install -e " git+https://git.repo/some_repo.git#egg=subdir& subdirectory=subdir_path" # install a python package from a repo subdirectory
1041+ py -m pip install -e SomePackage@ git+https://git.repo/some_pkg.git # from git
1042+ py -m pip install -e SomePackage@ hg+https://hg.repo/some_pkg.git # from mercurial
1043+ py -m pip install -e SomePackage@ svn+svn://svn.repo/some_pkg/trunk/ # from svn
1044+ py -m pip install -e SomePackage@ git+https://git.repo/some_pkg.git@feature # from 'feature' branch
1045+ py -m pip install -e SomePackage@ git+https://git.repo/some_repo.git#subdirectory=subdir_path # install a python package from a repo subdirectory
10451046
10461047 #. Install a package with `setuptools extras `_.
10471048
0 commit comments