Skip to content
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

Flatpak #1900

Merged
merged 5 commits into from
Jul 22, 2021
Merged

Flatpak #1900

merged 5 commits into from
Jul 22, 2021

Conversation

jwillikers
Copy link
Contributor

@jwillikers jwillikers commented Jul 17, 2021

This MR is to add a development Flatpak manifest to to the Thonny repository.
This work will allow developers to build Flatpaks locally with the latest source and makes it easy to integrate into CI workflows if desired.
The work here should be easy to transfer to a repository on Flathub.

At the moment, the Flatpak Pip Generator is having difficulties with a couple of dependencies, so this isn't working yet.
The current issue appears to stem from Pylint 2.8.3 and occurs when flatpak-builder is building the Python dependencies.

Fixes #968

@jwillikers
Copy link
Contributor Author

I've figured out a workaround for getting the Python dependencies working.
The development Flatpak appears to be working pretty well.

@aivarannamaa Would you be able to open a PR to the Flathub repository according to the instructions found here?
I've prepared my own fork for you to use here.

@jwillikers jwillikers changed the title WIP: Flatpak Flatpak Jul 19, 2021
@jwillikers
Copy link
Contributor Author

Plugins appear to work great in the Flatpak.
The main issue I've managed to find is that tools > Open system shell... doesn't work correctly since it can't find a terminal command within the Flatpak.
I believe it's possible to accomplish this by checking for available terminals and opening one using the flatpak-spawn command from with the Flatpak.
This will require some modification in terminal.py
The existence of the flatpak-spawn command should reliably indicate that Thonny is being run from inside a Flatpak.

@aivarannamaa aivarannamaa merged commit 1a84153 into thonny:master Jul 22, 2021
@aivarannamaa
Copy link
Member

Thank you for this work and especially for the comprehensive readme!

Why did you use .devel suffix in the application id? Is it meant to be a test-app or it has another meaning? Would it be OK, if I just remove this suffix?

@jwillikers
Copy link
Contributor Author

jwillikers commented Jul 22, 2021

Thank you for this work and especially for the comprehensive readme!

Why did you use .devel suffix in the application id? Is it meant to be a test-app or it has another meaning? Would it be OK, if I just remove this suffix?

@aivarannamaa Great question. I added the .Devel suffix to distinguish the development addition of the Flatpak from the release version that will be available on Flathub once you submit there. The suffix isn't necessary by any means, but it does allow installing a development version of the Flatpak alongside a released one. Many GNOME applications follow this convention. GNOME Podcasts is a good example. You'll see they have a .Devel manifest in their repository and that their release manifest is in Flathub's own repository here. The Flathub Flatpak will track specific releases of Thonny, but the development version built from the Flatpak Manifest here can be used to check the latest changes. You'll see in the Flathub repository I've made for you to copy from (here) that I removed the .Devel extension and changed the source to come from a specific Thonny release lieu of master. I hope that makes sense. Let me know if you have any questions or need help with the submission to Flathub!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Flatpak build
2 participants