Simple, easy way python batch program for debian?

I'm having trouble moving the maze of distribution tools for python and debian; cdbs , debhelper , python-support , python-central , blah blah blah ..

my application is quite simple: one python package (a directory containing modules and __init__.py ), a script to run the program ( script.py ) and some icons ( .png ) and menu items ( .desktop files).

From these files, how can I create a simple, clean .deb file from scratch without using the unnecessary tools listed above?

I mainly focus on ubuntu, but would like the package to work on direct debian

+7
python debian debhelper deb
source share
2 answers

python-stdeb should work for you. This is on testing with Debian / unstable and Ubuntu (Lucid onwards). apt-get install python-stdeb

This is less a shortcut method than a tool that tries to generate as many source packages as possible. He can actually create a package that works correctly and is almost up to standard. If you want your package to meet quality standards for inclusion in Debian, Ubuntu, etc., you will need to fill out files such as debian/copyright , etc.

As far as people claim that cdbs is very simple, I would like to point out that the Nick rule file that was mentioned can be easily executed using debhelper7. Do not forget that dh7 can be configured much easier than cdbs.

 #!/usr/bin/make -f %: dh $@ 

Note. Before shipping to Debian, you need to check if your package complies with Debian policy, Python Debian policy, etc. You really need to read the documents for this - without a shortcut.

+5
source share

First, the answer is that there is no easy way to make dpkg, and the documentation is divided into a million tiny pieces from a number of places. However, it is very useful to use the ubuntu Python Packaging Guide .

For simple packages (which are easy to describe with setuptools ), this procedure is quite simple if you have a debian control structure configured:

  • Run setup.py --sdist --prune and also set dist-dir to something reasonable
  • Call dpkg-buildpackage with the correct parameters for your package (possibly -b )

You will need a debian/rules file for the buildpackage function, but, fortunately, the work is done for you, if you use cdbs , you need something very similar to:

 #!/usr/bin/make -f DEB_PYTHON_SYSTEM := pysupport include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk 

If you are not using distutils , you can take a look at the DebianPython / Policy wiki page (under "CDBS + Hard Path"). There is a DEB_PYTHON_SYSTEM option for pycentral , which you can find on Google if you want to find more information.

+3
source share

All Articles