开发者

Using rpmbuild in Python

I'm a newbie and I'm trying to write a python script to build rpm packages as part of an automated build system (Hudson).

I'm looking at the rpm-p开发者_StackOverflowython API but I can't seem to see anything that relates to rpmbuild.

Am I missing something or is there no way to build an rpm package through the rpm api's? I was hoping I wouldn't have to call rpmbuild from the shell because the build process involves different platforms such as Solaris, and I wanted the script to be portable.

Thanks.


Debian includes python bindings for rpm allowing you to use rpm from python scripts

http://packages.debian.org/stable/python/python-rpm

Also checkout : API Documentation

RPM Python bindings - presentation and tutorial


If your project uses distutils, it is as simple as ./setup.py bdist_rpm More info on the Python docs page for distutils.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜