2

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 setup.py 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 setup.py, 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.

0

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

python MyProgram.py bdist_rpm

or also using --format option:

python MyProgram.py bdist --formats=rpm

This is just a quick view. So you can take a look at documentation which explains how to create RPMs from python libraries.

Hope this helps!

| 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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