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
.
精彩评论