RPM of a Python program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Clay Hobbs

    RPM of a Python program

    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

  • Jason Scheirer

    #2
    Re: RPM of a Python program

    On Aug 13, 5:52 pm, Clay Hobbs <c...@lakeserv. netwrote:
    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:



    The distutils package has a built-in bdist_rpm command that will
    create an installable RPM:



    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.

    Comment

    Working...