Skip to content

Commit

Permalink
Merge pull request #8093 from pradyunsg/better-docs-for-in-place-builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored Apr 19, 2020
2 parents 1d7b5d9 + 756b02f commit a531a15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
21 changes: 13 additions & 8 deletions docs/html/reference/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -723,19 +723,24 @@ local hash.

Local project installs
----------------------

pip supports installing local project in both regular mode and editable mode.
You can install local projects by specifying the project path to pip::

$ pip install path/to/SomeProject

Until version 20.0, pip copied the entire project directory to a temporary
location and installed from there. This approach was the cause of several
performance and correctness issues. As of version 20.1 pip installs from the
local project directory. Depending on the build backend used by the project,
this may generate secondary build artifacts in the project directory, such as
the ``.egg-info`` and ``build`` directories in the case of the setuptools
backend.

pip treats this directory like an unpacked source archive, and directly
attempts installation.

Prior to pip 20.1, pip copied the entire project directory to a temporary
location and attempted installation from that directory. This approach was the
cause of several performance issues, as well as various issues arising when the
project directory depends on its parent directory (such as the presence of a
VCS directory). The main user visible effect of this change is that secondary
build artifacts, if any, would be created in the local directory, whereas
earlier they were created in a temporary copy of the directory and then
deleted. This notably includes the ``build`` and ``.egg-info`` directories in
the case of the setuptools backend.

.. _`editable-installs`:

Expand Down
11 changes: 2 additions & 9 deletions news/7555.removal
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
Building of local directories is now done in place. Previously pip did copy the
local directory tree to a temporary location before building. That approach had
a number of drawbacks, among which performance issues, as well as various
issues arising when the python project directory depends on its parent
directory (such as the presence of a VCS directory). The user visible effect of
this change is that secondary build artifacts, if any, may therefore be created
in the local directory, whereas before they were created in a temporary copy of
the directory and then deleted. This notably includes the ``build`` and
``.egg-info`` directories in the case of the setuptools build backend.
Building of local directories is now done in place, instead of a temporary
location containing a copy of the directory tree.

0 comments on commit a531a15

Please sign in to comment.