Post

python-build-standalone has exploded in popularity, with over 70M downloads all-time. But what is a "standalone" Python build? It wasn't obvious to me at first! Initially, I didn't understand what problem was being solved or why it mattered...

This is fine if you're building and installing Python on a single machine... but it's a problem if you want to pre-build Python and then distribute it to other machines, since those paths might be wrong!

Which reminds me of my main problem with standalone builds on macOS: I can’t compile wheels because they assume some super weird Xcode path. I think it’s fair to say they can’t go full mainstream with that limitation so I wonder if that’s solvable at all? :-/

What’s this? I don’t have this problem and I build wheels all the time. Is there an issue somewhere?

0 reposts1 like

yes, mortals like myself have Xcode at /Applications/Xcode.app but standalone expects it at /Applications/Xcode_15.2.app "Compiling with an SDK that doesn't seem to exist: /Applications/Xcode_15.2.app/..." Here's the example I could come up with fastest.

Yeah. I never got around to shipping a minimal executable to fixup sysconfig on install. I also wanted to make it turnkey to install a modern LLVM toolchain that also “just worked.” With more reliable staffing and perhaps some upstream rethink around design of sysconfig, things can evolve.

Dynamic sysconfig is logically similar to “reinvent autoconf/configure.” So this problem is quite terrifying. It’s vastly simpler and more reliable to ship all the files (read: a toolchain) to end-users.