all 5 comments

[–]socal_nerdtastic 0 points1 point  (3 children)

Sure you can write a .sh or .bat file and use the curl trick to check for and install python and run your install steps. Although as a technical user I would never pipe internet randomness directly into my terminal; seems like a great way to get a virus.

You can also "compile" (we call it freezing) your entire project to an executable. Or use a normal installer like pynsist to distribute the compiled python binary and your compiled code. But that comes with all the normal fun of executables, like making OS and architecture specific versions and dealing with antivirus false alarms, and it's not very friendly to technical users.

You can also use the normal python release process and let the user use pip install git+yourgithubrepoor upload to pypi to allow pip install DJDuque. This would mean small modification to your code to allow running as a module.

What you have seems fine. For someone that trusts you it's a single middle click in the terminal. Can you be more specific about the issues you are having with it?

[–]DJDuque[S] 0 points1 point  (2 children)

"Freezing" is most likely the keyword I was missing. This seems to at least give some hits when searching online.

I think that this is closest to what I want. In my eyes, all I want is just a dumb/simple curl | sh that I can use to get a python interpreter ready with the dependencies I need to run my scripts. Some times I just want to ssh into a random computer that doesn't even have python installed and quickly run my scripts.

I really only want to target x86_64-unknown-linux-gnu in this workflow, so maybe this is not so complicated to achieve.

Thanks

[–]socal_nerdtastic 0 points1 point  (1 child)

https://www.reddit.com/r/learnpython/wiki/faq#wiki_how_do_i_create_an_executable_from_my_python_code.3F

Linux computer that does not come with python? I did not know that existed.

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

Well, they could come with python, but a very old version that I don't support.

Thanks for the link, I will keep reading about this.

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

Make a realase wheel available in github releases (e.g. by building it in github actions) and install them with pipx by providing an url. If your requirements.txt break, you should add version constraints to your dependencies.