Я пытаюсь создать проект с помощью Gnome Builder на Python. Документация очень ограничена, но я думаю выяснил:
Когда вы нажимаете кнопку "build" в Builder, он пытается собрать flatpak и запускает его. Это работает для начальной заглушки проекта. Когда я добавляю
import numpy
, проект не может быть запущен, потому что он еще не занят. Я думаю это нужно добавить в файл .JSON. Я также думаю, файл мезона предназначен только для "сбора" источников .py для flatpak-builder. Я следовал документации по http://docs.flatpak.org/en/latest/python.html и создал модуль для numpy с помощью flatpak-pip-generator.
Мой файл .JSON теперь выглядит так:
{
"app-id": "de.gymlan.Plottler",
"runtime": "org.gnome.Platform",
"runtime-version": "3.32",
"sdk": "org.gnome.Sdk",
"command": "plottler",
"finish-args": [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--socket=wayland",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"cleanup": [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"*.la",
"*.a"
],
"modules": [
{
"name": "plottler",
"builddir": true,
"buildsystem": "meson",
"sources": [
{
"type": "git",
"url": "file:///home/ulrich/Projekte/Plottler"
}
]
},
{
"name": "python3-numpy",
"buildsystem": "simple",
"build-commands": [
"pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} numpy"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ac/36/325b27ef698684c38b1fe2e546e2e7ef9cecd7037bcdb35c87efec4356af/numpy-1.17.2.zip",
"sha256": "73615d3edc84dd7c4aeb212fa3748fb83217e00d201875a47327f55363cef2df"
}
]
}
]
}
Носборка завершается с ошибкой из git, которую я не понимаю:
flatpak-builder --arch=x86_64 --ccache --force-clean --state-dir /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak-builder --download-only --disable-updates --stop-at=python3-numpy /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Plottler/flatpak/staging/x86_64-master /home/ulrich/Projekte/Plottler/de.gymlan.Plottler.json
Emptying app dir '/home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Plottler/flatpak/staging/x86_64-master'
Downloading sources
Fetching full git repo file:///home/ulrich/Projekte/Plottler
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Failed to download sources: module plottler: Der Kindprozess wurde mit Status 128 beendet
flatpak-builder --arch=x86_64 --ccache --force-clean --disable-updates --disable-download --state-dir /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak-builder --stop-at=python3-numpy /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Plottler/flatpak/staging/x86_64-master /home/ulrich/Projekte/Plottler/de.gymlan.Plottler.json
Starting build of de.gymlan.Plottler
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
(flatpak-builder:73): flatpak-builder-WARNING **: 16:45:17.109: Failed to get current git checksum: Der Kindprozess wurde mit Status 128 beendet
Cache miss, checking out last cache hit
(flatpak-builder:73): flatpak-builder-WARNING **: 16:45:17.109: rofiles-fuse not available, doing without
========================================================================
Building module plottler in /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak-builder/build/plottler-11
========================================================================
error: pathspec 'master' did not flatpak-builder --arch=x86_64 --ccache --force-clean --state-dir /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak-builder --download-only --disable-updates --stop-at=python3-numpy /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Plottler/flatpak/staging/x86_64-master /home/ulrich/Projekte/Plottler/de.gymlan.Plottler.json
Emptying app dir '/home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Plottler/flatpak/staging/x86_64-master'
Downloading sources
Fetching full git repo file:///home/ulrich/Projekte/Plottler
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Failed to download sources: module plottler: Der Kindprozess wurde mit Status 128 beendet
flatpak-builder --arch=x86_64 --ccache --force-clean --disable-updates --disable-download --state-dir /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak-builder --stop-at=python3-numpy /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Plottler/flatpak/staging/x86_64-master /home/ulrich/Projekte/Plottler/de.gymlan.Plottler.json
Starting build of de.gymlan.Plottler
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
(flatpak-builder:73): flatpak-builder-WARNING **: 16:45:17.109: Failed to get current git checksum: Der Kindprozess wurde mit Status 128 beendet
Cache miss, checking out last cache hit
(flatpak-builder:73): flatpak-builder-WARNING **: 16:45:17.109: rofiles-fuse not available, doing without
========================================================================
Building module plottler in /home/ulrich/.var/app/org.gnome.Builder/cache/gnome-builder/flatpak-builder/build/plottler-11
========================================================================
error: pathspec 'master' did not match any file(s) known to git
Error: module plottler: Der Kindprozess wurde mit Status 1 beendet
match any file(s) known to git
Error: module plottler: Der Kindprozess wurde mit Status 1 beendet
(последние строки на немецком языке "дочерний процесс не выполнен")