-
-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor editable wheel passing and installation
Installing the editable wheels via a pex was not effective. Using pex-tools to install two different pexes in the same venv caused conflicts with the __main__.py file. Using pex_path did not work because the editable wheel pex only had the editable wheels, not any of the dependencies. So, installing them in a pex was not effective. However, it does work to tell pex that the wheels are "sources". That way, pex just dumps them in the lib directory. Then, it was just a matter of adding the post-processing commands to move, install, and wrap up installation of the editable wheels. Even though we use pip to install the editable wheels, pants is both backend and frontend for PEP 660, because we generate the wheel (delegating dist-info generation to the external backend) and then install the wheel (delegating unpacking the wheel to pip). The final piece of complying with PEP-660 is to mark the install as an editable install via direct_url.json. We generate that when building the wheel, and then move it into place after pip has installed the editable wheels for us. One other method I considered was installing the editable wheels in the requirements pex. But I could not figure out how to combine EntireLockfile with additional wheel requirements. So, I punted and went merely passing the wheels as is via pex instead of attempting to install them in any pex. Finally, all of the export and local_dists_pep660 test pass!
- Loading branch information
1 parent
44d9788
commit b5aa26a
Showing
5 changed files
with
147 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.