LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-07-2006, 11:21 AM   #1
Saketh
Member
 
Registered: Jun 2005
Posts: 62

Rep: Reputation: 15
Question Packaging and distributing Python programs


I've written an application using Python and wxPython in Linux. It requires several libraries (ElementTree, wxPython, and Reportlab) as well as the Python interpreter. Most distros come with the Python interpreter, so I'm not worried about that.

I am relatively new to Linux, so my skill at distributing applications under the platform is nonexistent. I have no idea how to distribute my application to Linux users.

As an analogy, I'm trying to create binaries under Linux similar to how py2exe creates binaries under MS Windows. I've heard of something called cxFreeze, but I'm not sure if that's the proper way to distribute binaries for Linux users. I was also looking at RPMs, but I wasn't sure if they were the proper way to distribute binaries either.

I have no idea how to create an "Installer" under Linux. I want to make the application show up under the "Applications::Office" menu item (if my memory serves me correctly). I've seen people use a "setup.py" that they've written to install the application, but I have no idea how to do this.

Also, is there any way that I can add my application to a repository so that users can install it from something like YaST or apt-get?

In summary, here are my three questions:
  1. How can I create binaries for users under Linux?
  2. How can I create an "installer" for Linux users (i.e. a setup.py)?
  3. How can I add my application to a repository?
I am sorry if my questions are vague, but my lack of knowledge in distributing Linux applications limits the specificity of my questions. I would appreciate it if someone could point me towards documentation that could teach me how to do any of the above three things.

EDIT: I just happened to find an example of a setup.py that uses distutils, but I have no idea how to actually use it under Linux. Is it python setup.py install?

Thanks for the help.

Last edited by Saketh; 08-07-2006 at 11:50 AM.
 
Old 08-08-2006, 03:45 AM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
http://www.python.org/community/sigs...utils-sig/doc/

distutils is pretty much the standard way of doing it across platforms. It can generate RPMs and a few other formats as well as source distrobution files. Once you have written your setup.py it's pretty automatic from there. You don't need to include wxPython or anything but your app, the best way of doing it is to include a README that states wxPython is required to run the app. I have wxPython installed already, if I was to download your app what would be the point of installing it again? Leave that sort of stuff up to the end user.
 
Old 08-08-2006, 10:27 AM   #3
Saketh
Member
 
Registered: Jun 2005
Posts: 62

Original Poster
Rep: Reputation: 15
I have created a setup.py, as per the documentation.

If I want Linux users to install the application, would they have to execute python setup.py install? Or should I give them an RPM, instead?
 
Old 08-08-2006, 10:31 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Don't know about setup.py files, but if you distribute in RPM format only people using RPM-based distros would be able to install those files. Of course, there are programs that can convert to other package formats, but I don't know how well these work. It might be a good idea to distribute programs in tarball format.
 
Old 08-08-2006, 02:47 PM   #5
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Make a deb, rpm, and tar.gz binary and a source tarball as well. That should cover you. If you want to add yourself to a repository. You might try to add yourself to third party or commonly used extensions first. Livna, Guru, Multiverse, freshmeat, etc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Move to python 2.4 / Changing the packaging style for python packages LXer Syndicated Linux News 0 06-13-2006 07:54 PM
What do you use to develop python programs? stormrider_may Programming 2 03-11-2006 02:29 PM
LXer: Embedding Python in Your C Programs LXer Syndicated Linux News 0 12-31-2005 10:31 AM
Distributing Python apps with Glade UI vharishankar Programming 0 11-27-2005 03:50 AM
Freezing Python Card programs Hal Programming 1 04-11-2005 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration