Hacker News new | ask | show | jobs
by jvolkman 52 days ago
I'll one up this with my hack that changes the value of `sys.platform` based on the caller: https://github.com/jvolkman/rules_pycross/blob/main/pycross/...

This is used when cross compiling binary wheels (e.g., building a macos wheel on a linux build host or vice versa).

1 comments

That's indeed quite the hack! Also the filename heuristic is...quite something. Certainly agrees with my experience that in build-related scripts, all notions of clean code go out the window fast.

edit: wording