-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build installer packages automatically #107
Comments
We currently seem to use py2exe and py2app for Windows and macOS. According to a recent talk at PyCon Otto we should switch to PyInstaller, which allows building stand-alone executables for Windows, macOS and GNU/Linux alike. |
I agree we should definitely use PyInstaller instead of py2exe and py2app. And I agree that we need a reliable and automatic build process. |
We should also not forget about building the PythonTurtle Python package and push it to PyPI when releasing. I'd also suggest to trigger releases by pushing a Git tag (with the version number) to the GitHub repository. The installers may then be downloadable via the release page. I hope that's all possible in a seamless way. |
I agree, though that kind of automation is a bit of a high goal, if we even get to the point where we could do a release, I'd be ecstatic. |
Then prepare your space suit! 😄 |
As suspected, PyInstaller will require to run on the infrastructure it should build the installer for (e.g. on Windows for a Windows installer, on a Mac for a macOS installer). I have neither a Windows and Mac. Hence, I need to do the cumbersome finding-out how building is done on AppVeyor. Also, we need a macOS with Python 3 installed (and cross your fingers that the documentation is only outdated and we can also build with Python 3). I'll probably best start with automating building a Python package (and upload it to PyPI automatically). |
Do you want to add me as a maintainer to the PyPI project? Would make it easier for me to automate things when I can use my own credentials. My username is "bittner", unsurprisingly. |
I added you as a maintainer on PyPI. Regarding PyInstaller, I wonder whether a VM with ReactOS would work for generating a Windows installer. |
To make
Conclusions:
Doing either in a user-friendly "auto-detect prerequisites" way using |
I'm not sure how we would use a VM on a service in the cloud that would build the PythonTurtle package in an automated fashion. Can you elaborate? (Do you intend for local use on a developer machine only?) |
You're right, I didn't think this through. I guess there are 2 questions:
Let's say that the answer to the first question is yes, and there isn't a SaaS provider that gives that service. Then say we can set up a Docker image that runs VirtualBox with a ReactOS guest. Maybe we can find a SaaS provider that'll run that Docker image for us? |
pypa/packaging.python.org#267 contains quite a few interesting links to packaging Python applications. |
As soon as uploading the Linux bundle to GitHub is settled (via PR #123) we'll jump on the CI train for macOS, yeah! 😋 |
The next great thing after getting EXE for Windows and bundles for macOS working could be building an AppImage for Linux. This is something similar to a .dmg file on a Mac. It would be a single solution for all GNU/Linux distros! 🎉 😃 AppImage also has (somewhat) an AppStore, dubbed AppImageHub. And the comparison makes you understand that it's really a cool thing. 👍 |
Sounds good to me! |
As of now, building an application bundle on macOS (using PyInstaller) is not fully working. As an alternative, I thought, we may create a Homebrew formula. I'm currently looking at the related documentation:
Hmmm, it looks like it needs someone with a Mac to effectively develop the formula. Though it doesn't seem difficult, really. 🤔 Here are formulae related to Python (3):
It may be sufficient to depend on |
Just for reference, if the automatic releases don't work (they probably won't currently since the |
Ram, you have mentioned "Windows installer" to be the top-priority of the present. I do agree. Let's note down the current state of the union. Windows Installer (progress overview)
I think, I have prepared everything. Now, as I have neither a Windows computer nor I plan to buy one (same for macOS, by the way), the only thing missing is someone who takes over and puts the missing puzzle piece in place. From my gut feeling we're really, really close to "task completed". Next steps (volunteer needed)It looks like, all you have to do is create the necessary configuration with the Microsoft Visual Studio Installer Projects extension, according to an answer on StackOverflow. Hence, can you take over? What needs to be done, IIUC, is:
AppVeyor will then detect that file, build the installer and provide it for download at the build Artifacts page. References |
I don't feel that if I'll start working on it, it'll be close to completed. I don't even know how to use Visual Studio Project, or what's our current plan. If I were to take this task, I'd guess it'd take a few days of full-time work. You've put a lot of effort into this so I don't feel great about telling you this, but I definitely won't volunteer to work on this issue. PythonTurtle isn't close to being a priority in my life right now that I'd spend more than an hour, tops, on improving it. Am I being annoying by pointing to this issue from other issues, saying nothing is worth anything without this issue? I won't stop you from working on any other issues, I just probably wouldn't join because that effort seems wasted to me, but I won't block you, and if you'll need me for code reviews or small things, I'll be happy to do that. |
Having another thought at this. You say "I have neither a Windows computer nor I plan to buy one". If your objection to do the items you listed is because you've done enough on this ticket, or that you prefer not to spend your time doing Windows-related things, then yes, that's a fair objection. If the issue is that you don't want to spend money on a Windows license, then maybe that's solvable. One idea would be to use ReactOS, and seeing whether that runs Visual Studio Project. If ReactOS isn't an option, then maybe I could get a Windows license/machine to you. Let me know if that's helpful. |
Do you know a person that is enthusiastic about programming on Windows? Windows is a messy environment for Python. I don't want to contribute to a false image of "Python + Windows" fit well together, that's all. |
See #108 (comment) for alternative solutions to build an MSI installer (WiX, WiX.Py). We may be successful that way in combination with GitHub Actions. Does someone want to give that a shot? |
I don't, so I guess we'll wait until a possible volunteer arrives. |
A task list...
|
A few hints to help you make progress:
|
We received a super-nice answer by @judej on the Microsoft Developer Community request for help that I had posted! 😂 Bottom line: No MSI volunteer for us, but there are two more interesting projects, one that builds an installer and the other that builds a Python ZIP App:
That could be two nice alternatives worth evaluating. Thanks Jude! 💯 🎖️ |
Cool. I also recently heard about PyOxidizer. I'm still not 100% sure I understood the project (discussion) but it's possible it does what we want. |
I will take a shot at doing this with |
Sorry, I started a new job a few days ago and I won't have time to do anything :( |
|
Downside of pynsist is Windows only. I will try to advance Shiv (from LinkedIn) on Mac and Linux. |
Following up on issues #105 (comment), #106 and #90, I'd like to start collecting information on how to (best) do packaging for all platforms PythonTurtle runs on. When we know how to perform packaging manually it will be an easy task to automate it all.
In other words, we need
NOTE: If writing this up in this issue proves uncomfortable we may want to use the project Wiki to help us move along.
The text was updated successfully, but these errors were encountered: