Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Build should produce pex artifacts for all OSes #714

Open
billonahill opened this issue May 20, 2016 · 0 comments
Open

Build should produce pex artifacts for all OSes #714

billonahill opened this issue May 20, 2016 · 0 comments

Comments

@billonahill
Copy link
Contributor

billonahill commented May 20, 2016

Currently building in a given OS produces python pex artifacts that might only work that the build OS, since some python packages require per-OS builds. Ideally we should have a single pex that works on all OSes (see pex-tool/pex#68). With #68 done, the idea would be pex --platform="macosx-10.4-x86_64" --platform"linux-x86_64" would produce a single pex with all deps needed to support both OSX and Linux.

Until pex supports that we could produce multiple artifacts per OS.

Here's how pants currently does that via a multi_resolve() method:
https://github.com/pantsbuild/pants/blob/97c0bdba3eb39ee8dd4836a6547bed7e6cf937d6/src/python/pants/backend/python/python_chroot.py#L241-L268

By creating a dict of platform -> List of pkg_resources.Distribution instances meeting requirements that would otherwise be returned by a single resolve():
https://github.com/pantsbuild/pex/blob/master/pex/resolver.py#L307

This patch adds resolve_multi to pex, which would help quite a bit. We should focus our efforts on finishing up that patch before rolling our own in _pex.
https://github.com/pantsbuild/pex/pull/201/files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant