Skip to content

Commit

Permalink
Use req @ url syntax to install from remote VCS (#1207)
Browse files Browse the repository at this point in the history
This form is deprecated and due for removal in a future pip release.
  • Loading branch information
matthewfeickert authored Feb 13, 2023
1 parent 8d3a552 commit d36954f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ sphinx-autobuild==0.7.1
sphinx-inline-tabs==2021.4.11b9
python-docs-theme==2022.1
sphinx-copybutton==0.5.0
git+https://github.com/pypa/pypa-docs-theme.git#egg=pypa-docs-theme
pypa-docs-theme @ git+https://github.com/pypa/pypa-docs-theme.git
2 changes: 1 addition & 1 deletion source/guides/distributing-packages-using-setuptools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ you want "bar" installed from VCS in editable mode, then you could construct a
requirements file like so::

-e .
-e git+https://somerepo/bar.git#egg=bar
-e bar @ git+https://somerepo/bar.git

The first line says to install your project and any dependencies. The second
line overrides the "bar" dependency, such that it's fulfilled from VCS, not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ example, you can install directly from a git repository:

.. code-block:: bash
git+https://github.com/GoogleCloudPlatform/google-auth-library-python.git#egg=google-auth
google-auth @ git+https://github.com/GoogleCloudPlatform/google-auth-library-python.git
For more information on supported version control systems and syntax, see pip's
documentation on :ref:`VCS Support <pip:VCS Support>`.
Expand Down
4 changes: 2 additions & 2 deletions source/specifications/direct-url.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ Commands that generate a ``direct_url.json``:

* ``pip install https://example.com/app-1.0.tgz``
* ``pip install https://example.com/app-1.0.whl``
* ``pip install "git+https://example.com/repo/app.git#egg=app&subdirectory=setup"``
* ``pip install "app&subdirectory=setup @ git+https://example.com/repo/app.git"``

This comment has been minimized.

Copy link
@sinoroc

sinoroc Feb 14, 2023

Contributor

This does not seem right

* ``pip install ./app``
* ``pip install file:///home/user/app``
* ``pip install --editable "git+https://example.com/repo/app.git#egg=app&subdirectory=setup"``
* ``pip install --editable "app&subdirectory=setup @ git+https://example.com/repo/app.git"``

This comment has been minimized.

Copy link
@sinoroc

sinoroc Feb 14, 2023

Contributor

Same here, this does not seem right.

(in which case, ``url`` will be the local directory where the git repository has been
cloned to, and ``dir_info`` will be present with ``"editable": true`` and no
``vcs_info`` will be set)
Expand Down
16 changes: 8 additions & 8 deletions source/tutorials/installing-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -492,19 +492,19 @@ syntax, see pip's section on :ref:`VCS Support <pip:VCS Support>`.

.. code-block:: bash
python3 -m pip install -e git+https://git.repo/some_pkg.git#egg=SomeProject # from git
python3 -m pip install -e hg+https://hg.repo/some_pkg#egg=SomeProject # from mercurial
python3 -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomeProject # from svn
python3 -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomeProject # from a branch
python3 -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git # from git
python3 -m pip install -e SomeProject @ hg+https://hg.repo/some_pkg # from mercurial
python3 -m pip install -e SomeProject @ svn+svn://svn.repo/some_pkg/trunk/ # from svn
python3 -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git@feature # from a branch
.. tab:: Windows

.. code-block:: bat
py -m pip install -e git+https://git.repo/some_pkg.git#egg=SomeProject # from git
py -m pip install -e hg+https://hg.repo/some_pkg#egg=SomeProject # from mercurial
py -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomeProject # from svn
py -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomeProject # from a branch
py -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git # from git
py -m pip install -e SomeProject @ hg+https://hg.repo/some_pkg # from mercurial
py -m pip install -e SomeProject @ svn+svn://svn.repo/some_pkg/trunk/ # from svn
py -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git@feature # from a branch
Installing from other Indexes
=============================
Expand Down

1 comment on commit d36954f

@pradyunsg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah, I meant to say #egg rather than "this" in the commit message. Whoops!

Please sign in to comment.