Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a standard for source packages to be able to build rpms, debs (and perhaps others) without too much customization?

I'm talking mostly about Python, PyQt programs.

share|improve this question
up vote 6 down vote accepted

FPM can build debs/rpms from python packages on PyPI or from a local setup.py file. You can build a deb with

fpm -s python -t deb $package-name-on-pypi


fpm -s python -t deb setup.py

Building packages in other formats only requires you to change the -t (target type) parameter.

To produce debs I can also recommend python-stdeb.

share|improve this answer
+1 Exactly what I'm looking for. – Manuel Gutierrez Jun 26 '13 at 20:16

It looks like you are looking for something like PyInstaller.

It can package the application for you in a very simple way.

Please have a look at the site.

http://www.pyinstaller.org/ http://sourceforge.net/projects/pyinstaller/

The downside is it can only handle up to Python 2.7

Autopackage : If you want to package for different linux distributions you can try autopackage http://code.google.com/p/autopackage/

I do not have any experience with that so i do not know the details, and it seems to be unmaintained. I have looked through the code and it can be updated easily.

Brief explanation : If you want to package for different distributions then there is no real tool that can do that flawless for you. Even PyInstaller has its issues. If you really want to support different distro's, the best way to go is to make packages for the distro you want and maintain/update these as your program grows.

share|improve this answer
Does it create rpms and debs or a 3rd party independent format? – Manuel Gutierrez Jun 26 '13 at 13:43
It creates executables for Linux, Windows and OSX. it does not create .DEB and .RPM packages. For that you can try Autopackage. But I do not have any experience with that tool and the last release is quite old. – Dany Jun 26 '13 at 13:50
Thanks, I'll give a try to pyinstaller. – Manuel Gutierrez Jun 26 '13 at 14:30
@Manuel Gutierrez : Thank you. I did not know about PyPi and stdeb, because I mostly develop in C++, and Ruby. +1 for your answer! – Dany Jul 3 '13 at 19:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.