-
-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change removes pex dependence on `setuptools` and `wheel` resolution at build time in favor of vendoring pinned versions. Switching to a vendoring model allows us to eliminate code that dealt with the vagaries of supporting a ~5 year span of setuptools organic growth and API drift and it also allows us to fully isolate pex build-time interpreters. Going forward more libraries could be vendored easily at the cost of pex distribution size. Three changes make this possible: 1. The `pex.vendor` module is introduced to centralize vendored distribution management including establishing vendored distribution requirements and setting up interpreters with vendored distribution extras. 2. A `pex.vendor.__main__` is introduced and run via `tox -e vendor` to actually perform vendoring of third-party distributions inside pex. This includes installing the distributions in a the `pex/vendor/_vendored` subtree and re-writing their imports (shading). 3. The `pex.third_party` module is introduced to provide runtime import support for the vendored code using a [PEP-302](https://www.python.org/dev/peps/pep-0302/) `sys.meta_path` importer. Important consequences of this change include: 1. The pex runtime that used to be vendored under `.bootstrap/_pex` is now vendored under `.bootstrap/pex` in order to support a fixed `pex.third_party` vendor shading import prefix. The PEX runtime bootstrap demotion code is made more aggressive, correct and complete as a result to support and old pex vendored runtime handing off to a newer pex distribution to support pexed pex. In addtion, the `pex.third_party` vendoring importer is re-used to expose `pex` as `_pex` for users taking advantage of `_pex.util.DistributionHelper` and its `access_zipped_assets` for a deprecation period up to pex 2.0.0. 2. Since we no longer re-name `pex` to `_pex` in the runtime, all imports are now absolute. 3. The pex build-time interpreter cache is eliminated. Since we vendor the extras needed by interpreters, setup is now cheap, fast and hermetic and needs no cache. As a result the `--interpreter-cache-dir` flag now no-ops and is deprecated for removal in pex 2.0.0. Additional changes of note include: 1. The `bdist_pex` distutils command now dogfoods the pex cli for better fidelity with standard pex tool usage. 2. The pex `setup.py` is now self-hosting and can be run by a python interpreter lacking `setuptools` and/or `wheel`; in fact, pex can be pexed via `python -sSE setup.py bdist_pex`. Replaces #612 Fixes #607
- Loading branch information
Showing
200 changed files
with
39,725 additions
and
1,358 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). |
Oops, something went wrong.