【问题标题】:Debian packaging of Python codeDebian 打包 Python 代码
【发布时间】:2015-12-08 09:11:46
【问题描述】:

我正在尝试为我的 Python 代码创建一个 debian 包,但我对 debian/control 文件中的某些字段感到非常困惑。即,什么

X-Python-VersionXS-Python-VersionXB-Python-Version代表什么?

提前致谢。

【问题讨论】:

    标签: python debian packaging


    【解决方案1】:

    这里有描述: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)
    

    【讨论】:

    • 但这意味着什么?我是否使用 X-Python-Version 指定 python 版本,这是 build 包所必需的?那么如何指定支持运行我的包的最低 Python 版本。
    • 我想这是运行你的包所需的 Python 版本。大多数包不需要 Python 来构建它们,对吧?
    • 大部分没有,但我的有,怎么说呢?
    猜你喜欢
    • 1970-01-01
    • 2010-11-25
    • 2017-06-30
    • 1970-01-01
    • 1970-01-01
    • 2013-06-05
    • 1970-01-01
    • 2014-09-07
    • 2020-11-18
    相关资源
    最近更新 更多