简体   繁体   中英

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-python 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

如果您的项目使用distutils ,则就像./setup.py bdist_rpm一样简单。有关distutils 更多信息 ,请./setup.py bdist_rpm Python文档页面。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM