I want to emphasise that this is very unpolished at the moment. If you're interested in distributing games to Linux users, please try it out, but expect bugs! I hope it will be a stepping-stone to a more general tool to package Python applications using Flatpak, but I'm still thinking about how that will work, and I want to get some more experience of the Flatpak system.
I've updated the two example games I was working with to build with this tool. Here's the diff for Solarwolf, which didn't need any changes in the code: