How can I package a python tkinter application?

Hi, I’m trying to package some of my programs for Flatpak. They use python tkinter, and since it’s not distributed as a pip package, I’m wondering how do you ensure the dependency is present in the manifest file.

This is my manifest so far:

app-id: com.github.tralph3.Steam_Metadata_Editor
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
modules:
  - name: Steam_Metadata_Editor
    sources:
      - type: git
        url: https://github.com/tralph3/Steam-Metadata-Editor
finish-args:
  - --filesystem=home:rw
  - --socket=x11
  - --socket=wayland

The application as it is gets installed in /opt, and creates a config file in ~/.local/share/Steam-Metadata-Editor. It also needs access to the appinfo.vdf file that Steam creates in its installation directory, which can vary from system to system. It could theoretically be in any path in the home directory, although there is a default which is in ~/.local/share/Steam which is where the vast majority of installations will be.

So how can I install tkinter? I’ve read the docs, but I still don’t quite grasp how Flatpaks work. I’m trying to make connections as to how docker containers work, which I’m very familiar with, but they don’t seem to behave quite the same.

Some clarification would be appreciated, thanks.

Scribus and Inkscape both install tkinter separately. You can use that as an example.

How can I see their manifest files? I’ve been looking for a way to get Scribus’ one, but I can’t seem to be able to do so.

the flatpak manifest of scribus

Inkscape

and the module they use

you can search in manifest here

Some apps that use tkinyter ( i hope some day a generic way to maintain this)

Sorry for the late reply. Thank you, this has been really helpful.