Distributing Python Apps on Linux\BSD

P

PurpleServerMonkey

Working on a rather large open source python application that I want
to release for Linux and BSD and was wondering what methods others are
using to distribute large and complex applications.

Setuptools and friends seem to be focused on distributing modules, I'm
at the other end of the scale where I want to distribute an entire
application so that an Administrator can run a single install and have
a fully operational product. A key requirement is that I want the
application to fit in with what and admin would expect an application
to look like at the system level i.e site-packages like structures
aren't suitable.

So far I've thought of using a configure script and make which would
call some custom python installer script to do the actual install. It
fits in nicely with what I want to achieve but are there any better
options out there, how are others doing the same thing?
 
M

Miki

Hello,

Disclaimer: I'm not an expert on the subject.
Setuptools and friends seem to be focused on distributing modules, I'm
at the other end of the scale where I want to distribute an entire
application so that an Administrator can run a single install and have
a fully operational product. A key requirement is that I want the
application to fit in with what and admin would expect an application
to look like at the system level i.e site-packages like structures
aren't suitable.
You do that with distutils as well.
So far I've thought of using a configure script and make which would
call some custom python installer script to do the actual install. It
fits in nicely with what I want to achieve but are there any better
options out there, how are others doing the same thing?
Every distro flavor has it's own installer: apt/deb, rpm, port, ...
On Windows you can use one of the free installer (InnoSetup and
friends).

HTH,
 
P

PurpleServerMonkey

Hello,

Disclaimer: I'm not an expert on the subject.


You do that with distutils as well.


Every distro flavor has it's own installer: apt/deb, rpm, port, ...
On Windows you can use one of the free installer (InnoSetup and
friends).

HTH,

Well I'm not really interested in rpms or deb packages right now, I
want to get it to the point where it will run on BSD and Linux without
using distribution specific tools. Using a tarball or the standard
python tools would be best.

The problem is all the documentation surrounding distutils and
setuptools refers to modules, now I'm not sure why but it seems most
Python developers think an application is the same thing as a module.
Unless you are writing very small applications that's definitely not
the case.

So I guess the question is, using distutils or setuptools is it
possible for a user to select where to install the application i.e /
usr/local?
If not then I think it's going to be tarball deployment with a custom
setup script, was hoping there was a better way.
 
D

Diez B. Roggisch

PurpleServerMonkey said:
Well I'm not really interested in rpms or deb packages right now, I
want to get it to the point where it will run on BSD and Linux without
using distribution specific tools. Using a tarball or the standard
python tools would be best.

The problem is all the documentation surrounding distutils and
setuptools refers to modules, now I'm not sure why but it seems most
Python developers think an application is the same thing as a module.
Unless you are writing very small applications that's definitely not
the case.

So I guess the question is, using distutils or setuptools is it
possible for a user to select where to install the application i.e /
usr/local?
If not then I think it's going to be tarball deployment with a custom
setup script, was hoping there was a better way.

You should start reading the setuptools-documentation, especially the
section about entry-points. And yes, you can set the install-prefix.

If you have a sysadmin who knows how to read a README, it can't get
simpler than

python setup.py install

(with proper rights of course)

If he has no setuptools installe, put the ez_setup.py script together
into your distribution, then it becomes

python ez_setup.py
python setup.py install


Unfortunately there is one caveat: the distros rip out distutils and
Python-header into a separate -dev-package. Make sure to instruct the
admin to install these.

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top