Hi all!
After trying to snap a godot app with success (thank you guys!) I’m trying something more difficult and make the snap of persepolis, a python download manager.
Here my snapcraft.yaml file made following this great how-to plus some requested dependencies:
name: persepolis
version: git
summary: Persepolis
description: |
Persepolis is a download manager & a GUI for Aria2.
base: core18
confinement: devmode
if you try yourself th yaml you will find there is only a missing dependency: youtube-dl
I tried to put that strings in the parts/persepolis/stage-packages but it doesn’t work
Also, existing a youtube-dl snap, I tried to add a stage-snaps (following this doc) by adding in the same location a
stage-snaps:
- youtube-dl
resulting in this error:
Failed to load plugin: properties failed to load for persepolis: Additional properties are not allowed ('stage-snaps' was unexpected)
/snap/persepolis$ snapcraft
Failed to load plugin: properties failed to load for persepolis: Additional properties are not allowed ('stage-snaps' was unexpected)
I found that I had 2 snapcraft versions, one from repository (version 2.43.1) and one from snap ( version 3.10.1); I don’t know why but probably the repository version was the one used by default. anyway I removed the older version and after correcting a multipass error snapcraft was able to complete the dependencies process…now I only need to find the right launch command location
I’m having problem related to the apps: command: section; my snap compile and install successfully, but when i try to launch the app I receive this error:
:~/snap/persepolis$ persepolis
/snap/persepolis/x2/usr/bin/python3: can't open file '/snap/persepolis/x2/persepolis/__main__.py': [Errno 2] No such file or directory
this is all I have in the snap file:
/snap/persepolis/x2$ tree -d -L 2
.
├── bin
├── etc
│ ├── bash_completion.d
│ ├── ca-certificates
│ ├── fish
│ ├── fonts
│ ├── glvnd
│ ├── gss
│ ├── init.d
│ ├── openal
│ ├── pulse
│ ├── python2.7
│ ├── python3.6
│ ├── sensors.d
│ ├── ssl
│ └── X11
├── lib
│ ├── python3.6
│ ├── udev
│ └── x86_64-linux-gnu
├── meta
│ └── gui
├── meta.youtube-dl
├── share
│ ├── doc
│ └── man
├── snap
│ └── command-chain
├── snap.youtube-dl
│ └── command-chain
├── usr
│ ├── bin
│ ├── include
│ ├── lib
│ ├── sbin
│ └── share
└── var
└── lib
so there is not any of the source files where my snapcraft.yaml is located…
also I tried adding a bin directory containing an executable file like the one in the Doc:
#!/usr/bin/env python
# Startup from system-wide installation
# Copyright (C) 2002 - 2009 John Goerzen
# <jgoerzen@complete
#
# This program is free software;.....
import sys
import os
from persepolis import persepolis
oi = persepolis.main()
oi.run()
but changing the command part in the snapcraft.yaml like this:
The command 'bin/persepolis' was not found in the prime directory, it has been changed to 'bin/persepolis'.
Failed to generate snap metadata: The specified command 'bin/persepolis' defined in the app 'persepolis' is not executable.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
but the file has executable authorization:
~/snap/persepolis/bin$ ls -l
totale 12
-rwxrwxr-x 1 aurelio aurelio 953 mar 21 08:57 persepolis