3 ms·
Why does it have to be a self-contained binary? When you pack everything into an virtualenv you get more or less the same result, don't you? If you want to have
by ofrzeta 8y ago
Why does it have to be a self-contained binary? When you pack everything into an virtualenv you get more or less the same result, don't you? If you want to have a single file you can zip it :)
- nine_k 8y agoUsability-wise, there's a huge gap between even low-effort and no-effort actions. Another upside of a single binary is that it's not easy to modify; you can even sign it. Quite an upside if you want to audit what you deploy to your production that handles millions of dollars.
- ghthor 8y agoCan't you tar the python venv and sign it as well? Might be more difficult to get reproducible builds tgisbway, but it's sort of the same thing isn't it?
- sacado2 8y agoYou can deploy an executable on a server just by typing GOOS=linux GOARCH=386 go build foo && scp foo user@server: That's a lot of time saved, especially when you do it on a daily basis, and not something you can do as easily with virtualenv and such.
- meddlepal 8y agoYea I just do not buy it. How much time is saved? Is it writing an additional SSH command to extract the file or hitting the up-arrow on your keyboard to repeat the previously run command?
- sacado2 8y agoNot a lot, but when your test environment is on a remote server (because it replicates the production DB and you can't have that on your dev machine for security reasons), you tend to do it a lot. Add fast compilation to the mix, and you have a very productive workflow. `make && zip && scp && ssh unzip` is way slower than `go build && scp`
- joshuamorton 8y agoThere's also xar[1] (and similar things like par), which provide similar functionality in python in a managed way. Usage would be python foo/setup.py bdist_xar && scp foo/dist/foo.xar user@server if my understanding is correct. [1]: https://github.com/facebookincubator/xar https://github.com/facebookincubator/xar
- erik_seaberg 8y agoThen you don't have any metadata about what's installed nor a way to roll back. I'd rather have automation that runs "sudo yum update $MYPACKAGE".
- sacado2 8y agoGood point. We found ways to overcome these issues, but that's a tradeoff, for sure.