检查python setup.py –help-commands的命令列表, 会发现setuptools提供的打包命令如下:

bdist create a built (binary) distribution
bdist_dumb create a "dumb" built distribution
bdist_rpm create an RPM distribution
bdist_wininst create an executable installer for MS Windows
bdist_egg create an "egg" distribution

有bdist_rpm, 可以将软件打包成rpm包, 就可以拿来方便地安装到那些使用rpm包管理机制的linux操作系
统中了, 比如redhat, centos, suse等;但是没有bdist_deb的存在啊, 看到这个情况很郁闷啊, 不过
好在还是有别的解决方案的。

在debian/ubuntu系linux上安装python-stdeb:

sudo apt-get install python-stdeb

然后在打包的时候使用这个命令:

python setup.py --command-packages=stdeb.command bdist_deb

这样就可以在deb_dist下看到新打的.deb软件包。

不过上面的命令使用的参数全都是默认的, 而如果要做一个专业一些的deb软件包呢, 需要详细研究一下下面这个文档:
https://pypi.python.org/pypi/stdeb/
尤其是stdeb.cfg configuration file那部分, 这里写了stdeb.cfg中的所有选项以及其含义。
关于MIME-Desktop-Files, 借由这个选项, 可以把写好的软件桌面快捷方式(.desktop)随软件一起打包.
这个.desktop文件安装好了的话, 也同时会在你的开始菜单里建立好相应的应用条目, 会显得比较专业一些。

关于.desktop文件的写法, 请直接/usr/share/applications/下面找吧。