It should work if your entire transitive requireme...
# general
h
It should work if your entire transitive requirement graph has prebuilt wheels
n
Hi, thanks for the reply and information. How should I ensure that my entire transitive requirement graph has prebuilt wheels? Not sure at the moment how that translates to the relevant pants goal or command. Any help here would be much appreciated :)
h
If you're lucky, the relevant wheels are already on pypi. But that's unlikely since there are some pretty core sdist-only packages out there. Your other option is to get hold of a windows machine, build all the relevant wheels, and host them on a private repository, and point Pants to that for resolving.
n
What are your thoughts on using pex files for deploying Python scripts to Windows machines from Linux versus the alternatives? I'd be very curious to know your opinion and thoughts on this. Currently, my thinking is that it quite a simple and convenient approach, since it just requires the target user to have the same version of the Python interpreter that the pex was cross-compiled for. Let me know if my current mental model is not accurate anywhere in what I represented above 😆
h
Sorry, I should clarify that the pex bootstrapping does not, to my knowledge, work on native Windows
I missed that part of your question, my answer was relevant to being able to generate a lockfile and build a distribution, but you can't build a pex that runs on Windows
👍 1
n
Thanks for clarifying. Is it possible though to cross-compile a pex for Windows from Linux? Do you happen to know of anyone who has done that before?
h
The problem is the bootstrapping code in the pex
👍 1
n
Oh ok, so pex is only a viable solution on OSX and Linux?
h
you can build a pex that will include the windows wheels, I think, but when you try to execute it it will fail because its bootstrapping code doesn't (to my knowledge) work on Windows
Yeah, currently it's a POSIX thing
There is some stalled work to get it to work on Windows, but it's not close to complete
👍 1
n
Oh, ok, thanks for clarifying that. I was about to go down a 🐇
Is there an issue in the pants issue tracker for that Windows work that you can point me to?
Given that pex is not a viable deployment option for cross-compiling from Linux to it what would you suggest for deploying scripts to Windows in a monorepo that uses pants? Docker? Is there anything else that is as nice as pex? 😅
h
Is WSL on those windows machines an option?
👍 1
n
It might be, but not sure yet. I'll have to investigate that further. I thought of WSL as an option as well.