-
-
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.
Allow passing a preamble file to the CLI (#400)
This PR adds a new CLI option, -p or --preamble-file, that is used to provide a preamble to the pex builder object. We use pex via its API in the internal build tooling at NerdWallet (👋, we're neighbors!). We've been leveraging it for multi-platform support, but now that #394 / 1.2.9 has landed the only thing missing from the CLI that we leverage is the preamble in the builder, which was pretty easy to hook up. Once this PR has landed we can remove all of the API integration and just rely on the pex CLI! The CLI option and the PEXBuilder preamble functionality are covered by tests. Local functional testing: (pex-foo) evanborgstrom@evanborgstrom /tmp/preamble — u:34 j:1 (21:49:54 08.16) #536 ❯❯❯ echo 'print "foo!"' > preamble (pex-foo) evanborgstrom@evanborgstrom /tmp/preamble — u:34 j:1 (21:50:11 08.16) #537 ❯❯❯ pex -p preamble foo! Python 2.7.13 (default, Jun 7 2017, 11:02:53) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> (pex-foo) evanborgstrom@evanborgstrom /tmp/preamble — u:34 j:1 (21:50:18 08.16) #538 ❯❯❯ pex Python 2.7.13 (default, Jun 7 2017, 11:02:53) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>>
- Loading branch information
Showing
3 changed files
with
56 additions
and
2 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