<tfoot id='OfGy2'></tfoot>

    1. <small id='OfGy2'></small><noframes id='OfGy2'>

        <bdo id='OfGy2'></bdo><ul id='OfGy2'></ul>
      <i id='OfGy2'><tr id='OfGy2'><dt id='OfGy2'><q id='OfGy2'><span id='OfGy2'><b id='OfGy2'><form id='OfGy2'><ins id='OfGy2'></ins><ul id='OfGy2'></ul><sub id='OfGy2'></sub></form><legend id='OfGy2'></legend><bdo id='OfGy2'><pre id='OfGy2'><center id='OfGy2'></center></pre></bdo></b><th id='OfGy2'></th></span></q></dt></tr></i><div id='OfGy2'><tfoot id='OfGy2'></tfoot><dl id='OfGy2'><fieldset id='OfGy2'></fieldset></dl></div>
    2. <legend id='OfGy2'><style id='OfGy2'><dir id='OfGy2'><q id='OfGy2'></q></dir></style></legend>

        有没有一种标准的方法来创建用于分发 Python 程序的 Debian 包?

        时间:2023-11-08

        <legend id='8vqxX'><style id='8vqxX'><dir id='8vqxX'><q id='8vqxX'></q></dir></style></legend>
        • <bdo id='8vqxX'></bdo><ul id='8vqxX'></ul>
            <tbody id='8vqxX'></tbody>
          <tfoot id='8vqxX'></tfoot>

            1. <small id='8vqxX'></small><noframes id='8vqxX'>

            2. <i id='8vqxX'><tr id='8vqxX'><dt id='8vqxX'><q id='8vqxX'><span id='8vqxX'><b id='8vqxX'><form id='8vqxX'><ins id='8vqxX'></ins><ul id='8vqxX'></ul><sub id='8vqxX'></sub></form><legend id='8vqxX'></legend><bdo id='8vqxX'><pre id='8vqxX'><center id='8vqxX'></center></pre></bdo></b><th id='8vqxX'></th></span></q></dt></tr></i><div id='8vqxX'><tfoot id='8vqxX'></tfoot><dl id='8vqxX'><fieldset id='8vqxX'></fieldset></dl></div>
                  本文介绍了有没有一种标准的方法来创建用于分发 Python 程序的 Debian 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有大量关于如何做到这一点的信息,但由于给猫剥皮的方法不止一种",所有的教程/手册都涵盖了一些过程似乎做了一些与其他教程不同的假设,我仍然没有掌握它.

                  There is a ton of information on how to do this, but since "there is more than one way to skin a cat", and all the tutorials/manuals that cover a bit of the process seem to make certain assumptions which are different from other tutorials, I still didn't manage to grasp it.

                  到目前为止,这是我认为我理解的.

                  So far this is what I think I understood.

                  1. 我的最终目标应该是创建一个二进制".deb 包.这样的包将是平台无关的(32/64 位),因为所有 Python 程序都是如此.
                  2. 要创建二进制"包,我首先需要创建一个源包.
                  3. 要创建源代码包,我可以使用 CDBSdebhelper.Debhelper 是初学者的推荐方式.
                  4. 创建源代码包的核心是在源目录中的 DEBIAN 目录中填充许多文件,说明文件需要复制的位置、它们受制于什么版权和许可方案、什么他们拥有的依赖项等等......
                  5. 第 4 步可以在很大程度上自动化 dh_make 命令 if Python 源代码还带有 distutils 的 setup.py 脚本.
                  1. My final goal should be that of creating a "binary" .deb package. Such package will be platform-independent (32/64 bit) as all Python programs are such.
                  2. To create a "binary" package I need first to create a source package.
                  3. To create the source package I can use either CDBS or debhelper. Debhelper is the recommended way for beginners.
                  4. The core of creating a source package is populating the DEBIAN directory in the source directory with a number of files clarifying where files need to be copied, what copyright and licensing scheme they are subject to, what dependencies they have, etc...
                  5. Step #4 can be largely automated the dh_makecommand if the Python source also comes with a distutils' setup.py script.

                  现在我的问题:

                  1. 我对流程的理解是否正确?我是否遗漏了什么,或者我做错了什么?
                  2. 第 5 步确实让我更加困惑:具体而言,我最不清楚的两点是:
                    • 如何编写安装独立程序的 setup.py 脚本? 作者:独立程序 我的意思是一个旨在供桌面用户使用的程序(与 module 不同,我理解它是一个导入后供其他软件使用的功能集合).在我的具体情况下,我实际上需要两个这样的程序":主软件和一个单独的实用程序(实际上是第二个程序",它应该与另一个程序在同一个包中).
                    • 这种 DEB 包脚本的特殊性是什么?官方文档似乎只处理 RPM 和 Windows 的东西......
                  1. Is my understanding of the process correct? Is there anything I am missing, or anything that I got wrong?
                  2. Step #5 is really the more confusing to me: specifically the two points that remains most obscure to me are:
                    • How do I write a setup.py script that install a stand-alone programme? By standalone programme I mean a program intended to be used by a desktop user (as opposed to a module which I understand like a collection of functionality to be used by other software after having been imported). In my specific case I would actually need two such "programs": the main software and a separate utility (in effect a second "program" that should be in the same package with the other one).
                    • What are the specificities of such a script for DEB packages? The official documentation only seems to deal with RPM and Windows stuff...

                  顺便说一句:这些是迄今为止我能找到的最好的信息来源.如果你有比这更好的,请分享!:)

                  BTW: These are the best sources of information that I could find myself so far. If you have anything better than this, please share! :)

                  • Ubuntu 的 Python 打包指南
                  • 创建 .deb 包来自 python setup.py(它显示这些步骤,但它并没有解释足以让我跟随)
                  • ShowMeDo 视频使用 python 创建 .deb 包程序" (它似乎不是最新的,而且 - 如果我做对了 - 将生成供个人使用的包,没有依赖关系并且没有签名的变更日志和其他使其与 Debian 政策不兼容的关键数据).
                  • Ubuntu's Python packaging guide
                  • Creating a .deb package from a python setup.py (it shows the steps, but it doesn't explain them enough for me to follow along)
                  • ShowMeDo video on "creating a .deb package out of a python program" (it doesn't seem up-to-date and - if I got it right - will produce packages for personal use, without dependencies and without a signed changelog and other key data that will make it incompatible with the Debian policy).

                  推荐答案

                  看起来像 stdeb会做你想做的.

                  It looks like stdeb will do what you want.

                  另外,对于安装脚本,我强烈推荐 distribute 的 console_scripts 入口点支持.

                  Also, for installing scripts, I strongly recommend distribute's console_scripts entry point support.

                  这篇关于有没有一种标准的方法来创建用于分发 Python 程序的 Debian 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:获取 python docker 容器与 redis docker 容器交互 下一篇:为什么在 Kubuntu 12.04 中安装 numpy 需要 python-dev

                  相关文章

                    <tfoot id='rKiFK'></tfoot>

                    <small id='rKiFK'></small><noframes id='rKiFK'>

                      <bdo id='rKiFK'></bdo><ul id='rKiFK'></ul>

                      <legend id='rKiFK'><style id='rKiFK'><dir id='rKiFK'><q id='rKiFK'></q></dir></style></legend>
                      <i id='rKiFK'><tr id='rKiFK'><dt id='rKiFK'><q id='rKiFK'><span id='rKiFK'><b id='rKiFK'><form id='rKiFK'><ins id='rKiFK'></ins><ul id='rKiFK'></ul><sub id='rKiFK'></sub></form><legend id='rKiFK'></legend><bdo id='rKiFK'><pre id='rKiFK'><center id='rKiFK'></center></pre></bdo></b><th id='rKiFK'></th></span></q></dt></tr></i><div id='rKiFK'><tfoot id='rKiFK'></tfoot><dl id='rKiFK'><fieldset id='rKiFK'></fieldset></dl></div>