RPM of a Python program

C

Clay Hobbs

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
 
J

Jason Scheirer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top