RPM of a Python program
Jason Scheirer
jason.scheirer at gmail.com
Thu Aug 14 13:06:19 EDT 2008
On Aug 13, 5:52 pm, Clay Hobbs <c... at lakeserv.net> wrote:
> I want to make an RPM (Redhat Package Manager) file to install a Python
> program (not a module). How is this done? Does it use Distutils, or
> something completely different? Thanks in advance.
>
> -- Ratfink
You first want to make sure your setup.py correctly references your
python scripts:
http://docs.python.org/dist/node11.html
The distutils package has a built-in bdist_rpm command that will
create an installable RPM:
http://docs.python.org/dist/module-distutils.command.bdistrpm.html
So instead of running
$ python setup.py install
as you usually do, you would execute
$ python setup.py bdist_rpm
and in the directory where setup.py lives you should have a dist/
directory with an .rpm file ready to go. That's the easy part, if you
have other related resource files, etc, you are going to need to study
up on how to properly get them specified in your setup.py with
distutils, but it's completely doable.
More information about the Python-list
mailing list