我正在尝试将我的第一个python应用程序打包为snap应用程序。我检查了很多Github存储库,无法理解在执行snap应用程序时将二进制文件设置为要执行的apps:
部分(部分)。我已经尝试了很多方法,但是无法正确构建快照。
一旦构建表明phockup
找不到二进制文件,或者在执行成功构建二进制文件后的其他时间,我将phockup
获得Python控制台,提示到错误的路径phockup.py
这是我的snapcraft.yaml文件
您要捕捉的项目不包含setup.py
或任何类型的构建系统,因此Snapcraft不知道要安装的项目。您可以使用setuptools并将其添加setup.py
到您的项目中,也可以保持现状,并准确地告诉Snapcraft您想要安装的内容,就像这样(注意使用install
关键字):
name: phockup
version: '1.2.0'
summary: Photo and video sorting tool
description: |
Media sorting and backup tool to organize photos and videos from your camera in folders by year, month and day.
The software will collect all files from the input directory and transfer them to the output directory without
changing the files content. It will only rename the files and place them in the proper directory for the year, month and day.
grade: devel
confinement: devmode
apps:
phockup:
command: phockup
parts:
phockup:
plugin: python
source: https://github.com/ivandokov/phockup.git
source-tag: v1.2.0
install: |
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
cp phockup.py $SNAPCRAFT_PART_INSTALL/bin/phockup
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句