Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this.

I want to make this as an installable API, I mean to install through apt-get/ yum install. In terms of yum I have to create a repository and place the module in a FTP location. But I didn't get the complete picture about that. What are the steps I need to do to achieve this or some reference URL's would be helpful.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You should approach this as a two step process.

First make your api installable using pip by creating a setup.py file for the project and use setuptools. There is quite a lot to go through and I recommend you follow some of the examples out there to go through the steps before you start tweaking to get your own project installable this way. Extension in e.g. C that need compilation can be included.¹

Once that works correctly, you can use stdeb to base a Debian installable package from that (.deb).
The facilities for building an rpm are built-in, but require the rpm utility to be available.²

¹ If you get confused about setuptools, distutils, distribute, etc., welcome to the club. Read this stackoverflow answer for some comparison and history, and put this under your pillow
² It takes some care to get this to work, it is possible to have a working setup.py that doesn't work (well) as .rpm or .deb. Start with the working examples and go from there

share|improve this answer
    
+1 - These references are really helpful. –  Dinesh Appavoo Nov 2 at 3:33

Your Answer

 
discard

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.