Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a command line python script that I'd like to distribute. Being a PHP/Web guy, packaging software like this is a bit new to me.

The python script is simple, currently is run like this.

python /path/to/script -t -s some other argument

The python script requires an external library/package/module that is installed using it's own script. Currently the user has to do this themselves.

What I'd like to do is have a single rpm that will install the library/package/module using the, then put my script in /bin (or wherever it needs to go in this case).

That way the end user can download the rpm, install it, and simply use the script like so.

script -t -s some other argument 

How can I go about this? None of the documentation, guides I've found is beginner friendly. The target OS is CentOS 6.

Yes, the licensing of the external library/package/module allows me to do this.

share|improve this question

1 Answer 1

Maybe this can help you, just use the bdist group of commands. Like:

python bdist_rpm

or also using --format option:

python bdist --formats=rpm

This is just a quick view. So you can watch this Document about crating RPMs.

Hope this helps!

share|improve this answer
Thanks. I was looking at the link earlier, but that's for 'modules.' From what I understand about python, a module is more akin to a library that an actual script. I need to distribute my script as a usable executable WITH a module. Please tell me if I'm mistaken. – Sajan Parikh Jan 30 '13 at 16:08
@sajanNOPPIX ... so execute a module as a script?? – AAlvz Jan 30 '13 at 16:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.