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

Make --platform/--interpreter multi-options #201

Closed
wants to merge 51 commits into from
Closed

Make --platform/--interpreter multi-options #201

wants to merge 51 commits into from

Conversation

jjjake
Copy link

@jjjake jjjake commented Jan 20, 2016

No description provided.

Added `resolve_multi()` to `pex.resolver` which is simply a wrapper
around `pex.resolver.resolve()` for resolving requirements for multiple
platforms and/or interpreters. Converted `--platform` and
`--interpreter` into multi options. Switched `pex.bin.pex` to use
`resolve_multi()` rather than `resolve()`.
- Added docstring to ``resolve_multi()``.
- Added defaults for ``interpreters`` and ``platforms`` params if
  nothing is specified.
kwargs are provided directly to ``resolve_multi()``. ``resolve_multi()``
handles cache_dir conditional via ``resolve()``.
@kwlzn
Copy link
Contributor

kwlzn commented May 17, 2016

looks like this PR failed CI, so no one took a look - but it'd be great to have this feature in master.

any thoughts on getting this finalized? if time doesn't permit, you could also offer this up to another contributor to run with as it seems to be mostly there.

@jjjake
Copy link
Author

jjjake commented May 17, 2016

Thanks for following up @kwlzn, 'preciate it.

I do not have the time to work on this at the moment, and would be happy to hand it off to another contributor.

FWIW, I am currently using my resolve_multi branch to generate multi-platform pex files, so hopefully there won't be too much more work. I'm not very familiar with the pex source code, though, so I may be underestimating some of the corner cases.

Please let me know if there's anything I can do to help hand off to another contributor.

jjjake and others added 6 commits May 22, 2016 00:28
Added `resolve_multi()` to `pex.resolver` which is simply a wrapper
around `pex.resolver.resolve()` for resolving requirements for multiple
platforms and/or interpreters. Converted `--platform` and
`--interpreter` into multi options. Switched `pex.bin.pex` to use
`resolve_multi()` rather than `resolve()`.
- Added docstring to ``resolve_multi()``.
- Added defaults for ``interpreters`` and ``platforms`` params if
  nothing is specified.
kwargs are provided directly to ``resolve_multi()``. ``resolve_multi()``
handles cache_dir conditional via ``resolve()``.
@mzdaniel
Copy link

Hey @jjjake . Thank you for your implementing in this feature. So far, we have now all test passing. Not sure though how the CLI should work. As per @kwkn request, I am following this discussion at #68

jjjake and others added 16 commits August 3, 2016 16:00
Added `resolve_multi()` to `pex.resolver` which is simply a wrapper
around `pex.resolver.resolve()` for resolving requirements for multiple
platforms and/or interpreters. Converted `--platform` and
`--interpreter` into multi options. Switched `pex.bin.pex` to use
`resolve_multi()` rather than `resolve()`.
- Added docstring to ``resolve_multi()``.
- Added defaults for ``interpreters`` and ``platforms`` params if
  nothing is specified.
kwargs are provided directly to ``resolve_multi()``. ``resolve_multi()``
handles cache_dir conditional via ``resolve()``.
Fixes a bug introduced with --pex-root that raised an exception on when --disable-cache was used.
* Document the release process.
…rojects (#275)

As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
* Add unit test to make sure {pex_root} directory is not created
* Update the cache_dir in bdist_pex
rouge8 and others added 25 commits August 3, 2016 16:05
Setuptools does not require `console_scripts` entry points to call
`sys.exit()` (or similar) to exit non-zero:

    The functions you specify are called with no arguments, and their
    return value is passed to `sys.exit()`, so you can return an
    errorlevel or message to print to stderr

This patch updates pex to follow the same behavior.

Fixes #137.
- Add a new pex.executor.Executor class for normalized subprocess execution.
- Add new structured exception types for known failure modes of subprocess execution to provide actionable information to the end users on failure.
- Port over all known library usages of subprocess to pex.executor.Executor.
- Lightweight manual integration testing with pants master consuming pex master via local whl resolves.
Running bdist_pex would result in the creation of a directory literally named '{pex_root}'.

This fixes it by following behavior similar to that found in pex.bin.pex:main
* Add a test to reveal pants integration breakage.
* Repair passing of stdio kwargs to PEX.run().
* Fix bdist_pex --pex-args

Splitting on spaces with break on commands like:
    python setup.py bdist_pex \
        --pex-args="--python-shebang='#!/usr/bin/env python'"

This uses shlex.split instead.

* Add tests for bdist_pex --pex-args shebang with and without spaces
* Inherit user site with --inherit-path

* Extend existing tests for inheriting user site
…292)

* Add a test case to reveal an unhandled AttributeError when Executor attempts to execute a dir.
* Repair Executor error handling for other classes of IO/OSError.
Added `resolve_multi()` to `pex.resolver` which is simply a wrapper
around `pex.resolver.resolve()` for resolving requirements for multiple
platforms and/or interpreters. Converted `--platform` and
`--interpreter` into multi options. Switched `pex.bin.pex` to use
`resolve_multi()` rather than `resolve()`.
- Added docstring to ``resolve_multi()``.
- Added defaults for ``interpreters`` and ``platforms`` params if
  nothing is specified.
kwargs are provided directly to ``resolve_multi()``. ``resolve_multi()``
handles cache_dir conditional via ``resolve()``.
Added `resolve_multi()` to `pex.resolver` which is simply a wrapper
around `pex.resolver.resolve()` for resolving requirements for multiple
platforms and/or interpreters. Converted `--platform` and
`--interpreter` into multi options. Switched `pex.bin.pex` to use
`resolve_multi()` rather than `resolve()`.
kwargs are provided directly to ``resolve_multi()``. ``resolve_multi()``
handles cache_dir conditional via ``resolve()``.
Added `resolve_multi()` to `pex.resolver` which is simply a wrapper
around `pex.resolver.resolve()` for resolving requirements for multiple
platforms and/or interpreters. Converted `--platform` and
`--interpreter` into multi options. Switched `pex.bin.pex` to use
`resolve_multi()` rather than `resolve()`.
kwargs are provided directly to ``resolve_multi()``. ``resolve_multi()``
handles cache_dir conditional via ``resolve()``.
kwlzn added a commit that referenced this pull request Jul 25, 2017
…construction. (#394)

This revives and extends the prior attempt in #201 to forklift the multi-interpreter/platform resolve behavior from pants directly into pex to better support general usage via pex(1) (and transitively, the Heron team's Bazel+pex integration).

Fixes #68.
@kwlzn
Copy link
Contributor

kwlzn commented Jul 25, 2017

this has been superseded by #394 which is now in master, so closing this out. thanks @jjjake for getting the ball rolling.

@kwlzn kwlzn closed this Jul 25, 2017
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.

8 participants