我想从我的 Python 文件制作 .deb 包并包含图像文件。我的程序是一个简单的聊天客户端,使用 wxPython 制作。 .
如何制作易于制作的 .deb 包?
我的版本是Ubuntu 12.04(Precise Pangolin),Python是2.7.3版本,wxPython是2.8版本。
我的文件是 wxchat.py
和聊天客户端的三个图像 (JPEG) 文件。
最佳答案
如果您制作的 .deb 文件仅供内部使用(即不将其提交给 Debian 社区等),则有一个名为 stdeb 的工具:https://github.com/astraw/stdeb 。您可以使用 apt-get 安装它: sudo apt-get install python-stdeb。
如果您有 setup.py
,您可以通过以下命令创建 .deb 文件:
python setup.py --command-packages=stdeb.command sdist_dsc
cd deb_dist/packagename-versionname/
debuild -uc -us
cd -
您可以在stdeb.cfg
中指定依赖项:
[DEFAULT]
Depends:
python-wxgtk2.8
# You can restrict versions of the packages
python-wxtools (>= 2.8)
# Note that comments should start from the first character of the line
关于python - 如何从 Python 制作 .deb 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13323107/