How do I do Debian packaging of a Python package?

后端 未结 5 1180
無奈伤痛
無奈伤痛 2020-11-29 17:59

I need to write, or find, a script to create a Debian package, using package python-support, from a Python package. The Python package will be pure Python without C extensio

5条回答
  •  庸人自扰
    2020-11-29 18:41

    I would take the sources of an existing Debian package, and replace the actual package in it with your package. To find a list of packages that depend on python-support, do

     apt-cache rdepends python-support
    

    Pick a package that is Architecture: all, so that it is a pure-Python package. Going through this list, I found that e.g. python-flup might be a good starting point. To get the source of one such package, do

    apt-get source 
    

    To build it, do

    cd 
    dpkg-buildpackage -rfakeroot
    

    When editing it, expect that you only need the files in the debian folder; replace all references to flup with your own package name.

    Once you get started, it should take you a day to complete.

提交回复
热议问题