【发布时间】:2015-12-08 09:11:46
【问题描述】:
我正在尝试为我的 Python 代码创建一个 debian 包,但我对 debian/control 文件中的某些字段感到非常困惑。即,什么
X-Python-Version、XS-Python-Version和XB-Python-Version代表什么?
提前致谢。
【问题讨论】:
我正在尝试为我的 Python 代码创建一个 debian 包,但我对 debian/control 文件中的某些字段感到非常困惑。即,什么
X-Python-Version、XS-Python-Version和XB-Python-Version代表什么?
提前致谢。
【问题讨论】:
这里有描述:https://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html
debian/control 的通用段落(第一个,用于源包)中的可选 X-Python-Version(首选)或 XS-Python-Version 字段指定 Python 的版本(不是 Python 3 的版本)源包支持。同样,X-Python3-Version 用于指定包支持的 Python 3 版本。
在 debian/control 文件的二进制包段落中使用 XB-Python-Version 已被弃用,应删除
所以你应该只使用 X-Python-Version 或者 X-Python3-Version。
要指定构建您的包所需的 Python 版本,您需要Build-Depends,如下所述:https://www.debian.org/doc/packaging-manuals/python-policy/ap-build_dependencies.html
例如:
Build-Depends: python (>= 2.6.6-9)
【讨论】: