Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for in-place builds #8093

Merged
merged 1 commit into from
Apr 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Member

Choose a reason for hiding this comment

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

@pradyunsg I think that calling out the effect of this change (namely that .egg-info or build directories get created) in the changelog could have increased uor chances to get better feedback during the beta period.

Copy link
Member Author

@pradyunsg pradyunsg Apr 21, 2020

Choose a reason for hiding this comment

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

You are correct! And...

we can fix everything except the NEWS fragment later

I just realized that this is not true.

RTD is smart enough to detect beta release numbers, so that they don't end up on stable. So... we can update the NEWS.rst file on master directly to add this information.