{
 "app_id": "org.thonny.Thonny",
 "source_url": "https://raw.githubusercontent.com/flathub/org.thonny.Thonny/master/org.thonny.Thonny.yaml",
 "runtime": "org.freedesktop.Sdk",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--device=all",
  "--filesystem=home",
  "--filesystem=/media",
  "--filesystem=/run/media",
  "--system-talk-name=org.freedesktop.UDisks2"
 ],
 "module_count": 14,
 "fetched_at": "2026-09-20T07:03:02.432565+00:00",
 "manifest": {
  "id": "org.thonny.Thonny",
  "runtime": "org.freedesktop.Sdk",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.rust-stable"
  ],
  "command": "thonny.sh",
  "cleanup": [
   "/man",
   "/share/man"
  ],
  "finish-args": [
   "--device=all",
   "--filesystem=/media",
   "--filesystem=/run/media",
   "--filesystem=home",
   "--share=ipc",
   "--share=network",
   "--socket=x11",
   "--system-talk-name=org.freedesktop.UDisks2"
  ],
  "modules": [
   {
    "name": "tkinter",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --prefix=${FLATPAK_DEST} ."
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/iwalton3/tkinter-standalone",
      "commit": "4f5cfe3cdd1f58cd4e136fd66d4e5e27d21d820b"
     }
    ],
    "modules": [
     {
      "name": "tcl",
      "buildsystem": "autotools",
      "subdir": "unix",
      "post-install": [
       "chmod +w ${FLATPAK_DEST}/lib/libtcl*.so"
      ],
      "build-options": {
       "cflags": "-DTCL_UTF_MAX=4"
      },
      "cleanup": [
       "/bin",
       "/lib/pkgconfig",
       "/man"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://prdownloads.sourceforge.net/tcl/tcl8.6.15-src.tar.gz",
        "sha256": "861e159753f2e2fbd6ec1484103715b0be56be3357522b858d3cbb5f893ffef1"
       }
      ]
     },
     {
      "name": "tk",
      "buildsystem": "autotools",
      "subdir": "unix",
      "post-install": [
       "chmod +w ${FLATPAK_DEST}/lib/libtk*.so"
      ],
      "build-options": {
       "cflags": "-DTCL_UTF_MAX=4"
      },
      "cleanup": [
       "/bin",
       "/lib/pkgconfig",
       "/man"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://prdownloads.sourceforge.net/tcl/tk8.6.15-src.tar.gz",
        "sha256": "550969f35379f952b3020f3ab7b9dd5bfd11c1ef7c9b7c6a75f5c49aca793fec"
       }
      ]
     }
    ]
   },
   {
    "name": "python3-turtle",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm644 turtle.py ${FLATPAK_DEST}/lib/python3.11/site-packages/turtle.py"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/python/cpython/v3.11.6/Lib/turtle.py",
      "sha256": "787af385d6d4417aac8b686e8d5f49ce4afd7d1d09bde685bb378ed6ecc4fb7d"
     }
    ]
   },
   {
    "name": "python3-toml",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"toml\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz",
      "sha256": "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f",
      "x-checker-data": {
       "type": "pypi",
       "name": "toml"
      }
     }
    ]
   },
   {
    "name": "python3-flit_core",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"flit_core\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz",
      "sha256": "18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2",
      "x-checker-data": {
       "type": "pypi",
       "name": "flit_core"
      }
     }
    ]
   },
   {
    "name": "python3-poetry-core",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"poetry-core\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/54/ef/a16c11de95b638341961765e072dfdd4c9a0be51d6b22d594c5f3255e4bb/poetry_core-2.2.1.tar.gz",
      "sha256": "97e50d8593c8729d3f49364b428583e044087ee3def1e010c6496db76bd65ac5",
      "x-checker-data": {
       "type": "pypi",
       "name": "poetry-core"
      }
     }
    ]
   },
   {
    "name": "python3-setuptools_scm",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"setuptools_scm\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/10/5e/1aa9a93198c6b64513c9d7752de7422c06402de6600a8767da1524f9570b/pyparsing-3.2.5-py3-none-any.whl",
      "sha256": "e38a4f02064cf41fe6593d328d0512495ad1f3d8a91c4f73fc401b3079a59a5e",
      "x-checker-data": {
       "name": "pyparsing",
       "packagetype": "bdist_wheel",
       "type": "pypi"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl",
      "sha256": "f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548",
      "x-checker-data": {
       "name": "typing_extensions",
       "packagetype": "bdist_wheel",
       "type": "pypi"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/77/b8/0135fadc89e73be292b473cb820b4f5a08197779206b33191e801feeae40/tomli-2.3.0-py3-none-any.whl",
      "sha256": "e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b",
      "x-checker-data": {
       "name": "tomli",
       "packagetype": "bdist_wheel",
       "type": "pypi"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl",
      "sha256": "29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484",
      "x-checker-data": {
       "name": "packaging",
       "packagetype": "bdist_wheel",
       "type": "pypi"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/11/cc/5fda7ed3aab0814a86e428846b6b386f55093f4621d86e3cd081ae126c27/setuptools_scm-9.2.1-py3-none-any.whl",
      "sha256": "84c9b3f39ffb77ba00dd92a06e025e4f66dc69ab8df1c2a225a0678e76311f8d",
      "x-checker-data": {
       "name": "setuptools_scm",
       "packagetype": "bdist_wheel",
       "type": "pypi"
      }
     }
    ]
   },
   {
    "name": "python3-typing_extensions",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"typing_extensions\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl",
      "sha256": "f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548",
      "x-checker-data": {
       "type": "pypi",
       "name": "typing_extensions",
       "packagetype": "bdist_wheel"
      }
     }
    ]
   },
   {
    "name": "python3-setuptools_rust",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"setuptools_rust\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz",
      "sha256": "bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c",
      "x-checker-data": {
       "type": "pypi",
       "name": "semantic_version"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/bc/c4/8d3d282cee60d3ea0369fa15ce27387810040360adb4133e31990a7a2aba/setuptools_rust-1.12.0.tar.gz",
      "sha256": "d94a93f0c97751c17014565f07bdc324bee45d396cd1bba83d8e7af92b945f0c",
      "x-checker-data": {
       "type": "pypi",
       "name": "setuptools-rust"
      }
     }
    ]
   },
   {
    "name": "python3-cryptography",
    "build-options": {
     "append-path": "/usr/lib/sdk/rust-stable/bin",
     "env": {
      "CARGO_HOME": "/run/build/python3-cryptography/cargo",
      "CARGO_NET_OFFLINE": "true",
      "RUST_BACKTRACE": "1"
     }
    },
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"cryptography\" --no-build-isolation --no-binary cryptography"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz",
      "sha256": "78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2",
      "x-checker-data": {
       "type": "pypi",
       "name": "pycparser"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz",
      "sha256": "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529",
      "x-checker-data": {
       "type": "pypi",
       "name": "cffi"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/e3/3f/41186b1f2fd86a542d399175f6b8e43f82cd4dfa51235a0b030a042b811a/cryptography-38.0.4.tar.gz",
      "sha256": "175c1a818b87c9ac80bb7377f5520b7f31b3ef2a0004e2420319beadedb67290"
     },
     "cryptography-cargo-sources.json"
    ]
   },
   {
    "name": "python3-bcrypt",
    "build-options": {
     "append-path": "/usr/lib/sdk/rust-stable/bin",
     "env": {
      "CARGO_HOME": "/run/build/python3-bcrypt/cargo",
      "CARGO_NET_OFFLINE": "true",
      "RUST_BACKTRACE": "1"
     }
    },
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"bcrypt\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/8c/ae/3af7d006aacf513975fd1948a6b4d6f8b4a307f8a244e1a3d3774b297aad/bcrypt-4.0.1.tar.gz",
      "sha256": "27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd"
     },
     "bcrypt-cargo-sources.json"
    ]
   },
   "bundled-python-modules.json",
   {
    "name": "thonny",
    "buildsystem": "simple",
    "build-commands": [
     "python3 setup.py install --prefix=${FLATPAK_DEST} --root=/",
     "install -Dm644 packaging/linux/org.thonny.Thonny.desktop -t ${FLATPAK_DEST}/share/applications",
     "sed -i 's/Icon=thonny/Icon=org.thonny.Thonny/' ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
     "sed -i 's|Exec=/usr/bin/thonny|Exec=thonny|g' ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
     "for size in 16x16 22x22 32x32 48x48 64x64 128x128 192x192 256x256; do install -Dm644 -T packaging/icons/thonny-$size.png ${FLATPAK_DEST}/share/icons/hicolor/$size/apps/${FLATPAK_ID}.png; done",
     "install -Dm644 packaging/linux/org.thonny.Thonny.appdata.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.appdata.xml",
     "install -Dm 755 -t /app/bin/ thonny.sh"
    ],
    "sources": [
     "thonny-sources.yaml",
     {
      "type": "patch",
      "path": "0001-Update-appstream-metadata-3098.patch"
     },
     {
      "type": "patch",
      "path": "0002-Create-venv-and-install-pip-in-venv-as-separate-step.patch"
     },
     {
      "type": "script",
      "dest-filename": "thonny.sh",
      "commands": [
       "export PYTHONUSERBASE=$XDG_DATA_HOME",
       "/app/bin/thonny \"$@\""
      ]
     }
    ]
   }
  ]
 }
}