4 ms·
If this is so desirable, why haven't people been shipping open source C and C++ software this way? It's not like Go invented static linking. Not just C and C++
by danellis 11y ago
If this is so desirable, why haven't people been shipping open source C and C++ software this way? It's not like Go invented static linking.
Not just C and C++, either -- Python, Ruby etc software could be shipped as statically linked executables.
- spenczar5 11y agoPeople often _do_ ship C and C++ software this way with dpkg. Static linking is sometimes discouraged because it makes it harder to identify what needs to be upgraded in case of (for example) security vulnerables in core libraries like libc. Could you elaborate on how Python software can be shipped as a statically linked executable? I'm not familiar an easy way to do that, and it would help me quite a bit.
- kej 11y agoIt's not really a static Python .exe, but PyInstaller can create a single executable that embeds all of its dependencies in the file. Except for a small delay at startup it works really well.
- jeremydw 11y agoThis is how I distribute Grow (grow.io), a Python program. It's worked really well so far, but it's also produced a few issues in development, for me. For example, PyInstaller itself changes drastically from version-to-version, and I've previously had to spend hours picking away at why "compiled" Grow worked before but no longer works post-PyInstaller updates. Overall happy though, and much happier to write in Python and distribute a single executable without requiring folks to muck around with Python versions, pip, dependencies, etc.
- giovannibajo1 11y agoThe python distribution story is far behind Go. This article goes into more details: https://glyph.twistedmatrix.com/2015/09/software-you-can-use.html https://glyph.twistedmatrix.com/2015/09/software-you-can-use... PS: I'm the original author of PyInstaller. I obviously love it but it's a gross hack around the fact that Python doesn't have a serious distribution story.