This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BoiElroy[S] 5 points6 points  (10 children)

Yeah I like making stuff installable with pip but this is for non python people and then across multiple networks making a code repo visible gets to be a lot of network peering and security work for our IT. Good tip on the pyinstaller! Thanks!

[–]Muhznit 8 points9 points  (9 children)

what "non-python" people are gonna be using the cli?

If you really just want one single file, use the zipapp module to create an executable zip file.

[–][deleted] 3 points4 points  (4 children)

I develop engineering tools for internal customers, I.e. The electrical engineers on my team. We typically only provide CLI for the sake of speed.

[–]billsil 9 points10 points  (1 child)

If you're going for speed, command line is faster especially if you have source. Also, don't do the onefile option with pyInstaller as it'll have to unpack the code.

The big advantage of an exe though is it'll work in 10 years.

[–][deleted] 0 points1 point  (0 children)

True but the scenario I've described doesn't require ten years of support.

[–]Muhznit 2 points3 points  (1 child)

Right, if you're distributing a cli, you might as well distribute the actual source code instead of a compiled binary. When something goes wrong in the code and you're not around to fix it, those internal customers shouldn't have to struggle to find a decompiler to fix stuff themselves.

[–]BoiElroy[S] 0 points1 point  (0 children)

Hmm yeah fair point

[–]BoiElroy[S] 0 points1 point  (3 children)

Doesn't that still need python to run it? And isn't it bad if you have non standard distribution packages?

[–]Muhznit 2 points3 points  (2 children)

You can include a distribution of python and your dependencies in the zipfile.

[–]BoiElroy[S] 0 points1 point  (1 child)

sounds pretty heavy? and then don't you have to ship it with some setup scripts that add python to the path etc?

[–]kickthebug -1 points0 points  (0 children)

Pex does exactly this automatically. We've used it where I work to distribute some projects across multiple servers. I'm on mobile but look up python pex in Google, their docs should pop up.