hundreds-father-404
07/22/2021, 8:30 PM./pip_compile.pex --pip-args '--platform=fake'
, suggesting the arg gets ignored. (But weirdly, --pip-args '--not-an-opt'
does fail)hundreds-father-404
07/22/2021, 8:33 PM--platform
Otherwise, I think you'd need to generate the lockfile on both a macOS and a Linux machine, and (manually?) merge the two lockfiles by using environment markers to handle discrepencies, a la https://github.com/pantsbuild/pants/pull/12362hundreds-father-404
07/22/2021, 8:34 PMA way to generate a lockfile for both platforms from a single machine is something like --platformBut then this fails if you don't already have bdist_wheels for every requirement on the foreign platform 🤔
witty-crayon-22786
07/22/2021, 8:37 PMpex_binary
witty-crayon-22786
07/22/2021, 8:37 PMwitty-crayon-22786
07/22/2021, 8:38 PMhundreds-father-404
07/22/2021, 8:38 PMplatforms
I'm talking about, say, generating Black lockfile. No platforms
are hardcoded. To be sure the lockfile is truly compatible w/ both OSes, we need to either pessimistacally generate on both OSes or use John's post-processing suggestion to see if env markers are usedwitty-crayon-22786
07/22/2021, 8:39 PMwitty-crayon-22786
07/22/2021, 8:39 PMwitty-crayon-22786
07/22/2021, 9:04 PMI’m talking about, say, generating Black lockfile. Nomm, yea. but we know black only runs where Pants does.are hardcoded. To be sure the lockfile is truly compatible w/ both OSes, we need to either pessimistacally generate on both OSes or use John’s post-processing suggestion to see if env markers are usedplatforms
witty-crayon-22786
07/22/2021, 9:04 PMhundreds-father-404
07/22/2021, 9:05 PMso we can enumerate the platforms.Yes, but doing a foreign platform resolve might fail when it shouldn't because it would require that every wheel is a bdist. Even though in reality, Black does not have platform env markers so no need to generate lockfile w/ both platforms This is where John's post-processing could be useful
hundreds-father-404
07/22/2021, 9:09 PMwitty-crayon-22786
07/22/2021, 9:10 PMwitty-crayon-22786
07/22/2021, 9:12 PMhundreds-father-404
07/22/2021, 9:13 PMhundreds-father-404
07/22/2021, 9:14 PMwitty-crayon-22786
07/22/2021, 9:14 PMwitty-crayon-22786
07/22/2021, 9:15 PM