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

Switch vendoring from pip install ... to Pex install. #2306

Merged

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Dec 16, 2023

Pex now only uses Pip for resolving distributions (pip download ...)
and building wheels (pip wheel ...), installation of wheels in chroots
and venvs is now completely handled by Pex everywhere in the code base.

Kill unused interpreter parameter and fixup comment to reflect new use
of pep_427.
Fix vendoing finalization excludes to handle bytecode.
Copy link
Collaborator

@huonw huonw left a comment

Choose a reason for hiding this comment

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

Nice clean up; just one question.

installed_files.append(
InstalledWheel.create_installed_file(path=requested_path, dest_dir=dest)
)
if interpreter:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the change from unconditional to conditional for these files?

Copy link
Member Author

Choose a reason for hiding this comment

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

REQUESTED is not required at all; see: https://peps.python.org/pep-0376/#one-dist-info-directory-per-installed-distribution.

RECORD is required to support uninstalling as noted; so we still include it when an interpreter is supplied (installing in a venv) for interoperability with external tools like pip uninstall, but not for installed wheel chroots since those are private and never uninstalled by anyone but Pex, and, since they are chroots, this can be done with a simple recursive chroot dir remove.

So, basically, this just saves a small amount of work for the most common Pex wheel install case.

@jsirois jsirois merged commit 5a42abf into pex-tool:main Dec 17, 2023
24 checks passed
@jsirois jsirois deleted the pep_376/Record.from_pip_prefix_install/remove branch December 17, 2023 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants