我试图通过将 unity-tweak-tool 重新打包为 snap 来学习快速桌面打包。我发现文档不那么出色,但到目前为止我有一个看起来像这样的 snapcraft.yaml 文件:
name: unity-tweak-tool
version: 1
summary: configuration tool for the Unity desktop environment
description: |
Unity Tweak Tool is a settings manager for the Unity desktop.
It provides users with a fast, simple and easy-to-use interface
with which to access many useful and little known features and settings
of the desktop environment that one may want to configure.
apps:
unity-tweak-tool:
command: $SNAP/usr/bin/unity-tweak-tool
plugs: [unity7]
parts:
unity-tweak-tool:
plugin: python3
source: git://github.com/Seth-Johnson/unity-tweak-tool.git
source-type: git
build-packages:
- python3-distutils-extra
- python3-all
- python3-dbus
- python-dev
stage-packages:
- gir1.2-glib-2.0
- gir1.2-gtk-3.0
- python3-xdg
- python3-cairo
- unity-webapps-service
Run Code Online (Sandbox Code Playgroud)
但是,当我运行snapcraft snapsetup.py 时总是失败,因为缺少几个 python 模块:
Running setup.py install for unity-tweak-tool ... error
Complete output from command /home/sethj/projects/snappy-testing/parts/unity-tweak-tool/install/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-s6dwhgys-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xxv1mi7p-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmp2y5izah7:
ERROR: Python module values not found
ERROR: Python module apport not found
ERROR: Python module apport.hookutils not found
WARNING: syntax errors in notes/wizardry.py: Missing parentheses in call to 'print' (wizardry.py, line 9)
ERROR: Python module dbus not found
ERROR: Python module dbus.service not found
ERROR: Python module dbus.mainloop.glib not found
Run Code Online (Sandbox Code Playgroud)
(完整输出在这里)
我承认我不是 100% 确定我这样做是否正确,但据我所知,它应该构建 build-packages 下列出的包,这些包满足 unity-tweak-tool 的构建要求。
我哪里错了?
在 python 的情况下,您可能希望其中一些build-packages是stage-packages. python 插件设置PYTHONPATH在 snap 包内,这就是为什么它缺少这些包的原因(您将它们安装在主机系统上)。
顺便说一句,如果这个上游install_requires在setup.py这些依赖项中有一个适当的,就会自动为你处理。
| 归档时间: |
|
| 查看次数: |
1689 次 |
| 最近记录: |