Skip to content

Commit

Permalink
Improve documentation for in-place builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Apr 19, 2020
1 parent a0bead2 commit 7eca891
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
22 changes: 14 additions & 8 deletions docs/html/reference/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -723,19 +723,25 @@ 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 generates a wheel distribution for the directory provided, that it uses
to perform the installation. It may fall back to using ``setup.py install``
if it is unable to generate a wheel distribution from the directory.

Prior to pip 20.1, pip copied the entire project directory to a temporary
location and attempted to generate the distribution from that directory.
This approach was the cause of several 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 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 7eca891

Please sign in to comment.