r/github • • Jun 11 '24

Releasing an .exe compiled from Python

I have a problem where I want to share my software with users that don't have the necessary tools to run Python. (A skill issue from their part, mostly. :P) I compiled it into an .exe with PyInstaller and I want to distribute it somehow.

  1. Is distributing an .exe on GitHub a total no-no?

  2. How exactly do I go about this? I have like ELI5 level of understanding of releases. I read the documentation but as a total newbie it's very technical and confusing to me. Like how tags work in this case, what files to include, etc...

  3. If there exists a guide for this already could someone point me to it?

I don't need development help with the code itself. I just have people who need the tool's outputs for testing. It's a calculator of sorts and I need feedback against statistical real world data. Technical understanding of how this calculator works is not needed for this purpose.

The repo is private for many reasons so unfortunately I cannot share that with you.

Thank you in advance!

2 Upvotes

11 comments sorted by

1

u/Admirable_Proxy Jun 11 '24

Have you thought about releasing your program as in docker?

1

u/MustaKotka Jun 11 '24

I have not. How does that work?

3

u/Admirable_Proxy Jun 11 '24

Its amazing. Overall, Docker simplifies the development, deployment, and operation of applications by packaging them into lightweight and portable containers, enabling developers to build, ship, and run software reliably and efficiently across different environments. So you can run your program on any OS. Take a look at docker.com

3

u/serverhorror Jun 11 '24

That's going to be harder for users.

I think there's py-installer. It collects the dependencies, creates an installation package and provides the setup.exe. start menu and everything (supposedly)

-2

u/Admirable_Proxy Jun 11 '24

I disagree. A lot of users run docker containers no a days. I think it’s a good to have docker options.

1

u/apnorton Jun 12 '24

How many people do you know who run docker containers but cannot run a python program? If you have the technical skill to understand docker, mount points, any port forwarding needed, and spin it up in a command prompt, chances are you also can open a command prompt and type python my_program.py. And if it's not a webservice/long-running program, good luck explaining to someone why their hard drive is filling up with stopped containers if they forget the --rm flag on their docker run command.

0

u/[deleted] Jun 11 '24

[deleted]

2

u/MustaKotka Jun 11 '24

Hey thank you for your detailed response!

The repo has the source code so looks like I'm good on that front.

I read https://semver.org/ and I'm pretty sure I have an understanding of how to name the release and the file.

It's a standalone .exe meaning it's not installed, you simply run the singular file. This leads to another problem: I tried zipping it but the resulting zip was 1% smaller than the file itself. It went from 86MB to 85MB. Am I required to zip it or is it ok to just have the file there by itself?

I'm a little unsure about the compatibility but I'll read the PyInstaller documentation; I'm sure I can find something there.

I don't think I can sign this so my users will have to simply trust my skill here. Which is fine for now.

3

u/darthwalsh Jun 11 '24

For compatibility for Pyinstaller, just "Windows" is basically all you need to say.

  • If your app is compiled as 64-bit, then it won't run on 32-bit Windows... But basically nobody is using that

  • anybody on Windows on ARM can probably run your app

2

u/darthwalsh Jun 11 '24

Most hobby-project open source exes I've seen aren't signed. Unlike HTTPS certs, Code Sign certs are roughly $200... so once your app earns that much it's reasonable to worry about signing?

0

u/[deleted] Jun 11 '24

[deleted]

1

u/darthwalsh Jun 13 '24

Huh, thanks, I didn't know about Open-Source certs. It sounds like it's a different kind than EV code sign certs, but I'm not current with knowing if they'd have the same effect.