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

Multiple platform apps? #26

Open
borgstrom opened this issue May 9, 2018 · 4 comments
Open

Multiple platform apps? #26

borgstrom opened this issue May 9, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@borgstrom
Copy link

@sixninetynine! Shiv looks rad. I've been lamenting about pkg_resources slowing down our Python CLI tools @NerdWallet.

One pex feature we rely on is building a single .pex file for multiple platforms (i.e. pex --platform linux-x86_64 --platform macosx-10.11-x86_64 ...). We pre-compile all of our own wheel files in a private repo so this means we end up with a single .pex full of our custom built wheels (fast builds, happy security folks, etc...)

#7 talks about invoking shiv for a different target, but it doesn't talk about multiple targets.

Is this even possible with Shiv? I hope so, I'd love to contribute back to shiv and explore moving to it!

@lorencarvalho
Copy link
Contributor

Hey @borgstrom! Good to hear from you 🙂

Currently shiv is constrained to building a locally-compatible artifact, e.g. build on osx, ship to osx. Likewise for linux (though you can use things like --only-binary :all: which usually ends up giving you a manylinux compatible pyz). Peep the gotchas.

#7 is still in the forefront of my mind, I am still convinced the best path forward is continuing to leverage pip. It's what makes shiv so dead simple. As you point out, you already have machinery to build wheels, so the only holdup is getting past the pep425 checks in pip install, that discussion has been happening in pypa/pip#5355. I'm hoping I can catch someone from PyPA at PyCon this weekend to talk about options there. Will you be at pycon?

That said, let's assume that #7 is solved/merged in some manner, then making multi-plat pyz files with shiv would be as simple as including a local-platform check in the bootstrap code, and only unpacking a compatible site-packages. The artifacts themselves would get pretty big, but I imagine that's the tradeoff you are looking for.

@Lawouach
Copy link

Lawouach commented May 14, 2018

Just a ping to say I fully support the potential of such feature here.I see shiv as the right way for the chaostoolkit to be packaged/distributed moving forward with such capability.

@luislew
Copy link
Contributor

luislew commented Feb 29, 2020

@lorencarvalho I came here to check on the status of this... pip has long since been updated, and it looks like there is support for building for non-local platforms. Is there a plan to enable building multi-platform .pyz files using shiv?

@delijati
Copy link

I solved it at least for windows by creating a docker image with wine and running the command in there. Works pretty well https://github.com/delijati/docker-shiv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants