[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Re: windows installer

From: David Grant
Subject: Re: [Gnumed-devel] Re: windows installer
Date: Fri, 20 Feb 2004 11:43:38 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6) Gecko/20040207

Karsten Hilbert wrote:

ACK. However, "GnuMed" is not a "Python program". It is an
application package consisting of - among other things -
Python scripts. python isn't suitable.
Please elaborate. I looked at the source and it looks like there are a bunch of python scripts which talk to the database on the server side, and the current client seems to be the python/wxPython one. What else is in there, which isn't Python? I think usually this is still easily handled by the main script, if there are other binaries or files to be installed.
There are shell scripts (wrappers) and data files (i18n).
There are also log file locations (/var/log/gnumed/) and
config file locations (/etc/gnumed/) to be set up. Also, some
structure (~/gnumed/) in users' home directories (eg. add it
to /etc/skel/) is needed.

From Gentoo's perspective, we would do something like:

src_install() {
insinto /var/log/gnumed
doins <all-the-log-files>
insinto /etc/gnumed
doins <all-etc-files>
insinto /etc/skel
doins <template files>
distutils_src_install (this calls distutils, everything is done automagically)

I've attached a sample ebuild for a python package I built, for scipy. Actually there is a function called src_compile() which isn't shown. That runs "distutils_src_build" automatically, if the function isn't declared which in turn calls "python build" with any necessary arguments.

Using this kind of setup saves package makers and maintainers a lot of time. It means shifting the bulk of the installation job onto the upstream developers which is smart. I've seen a lot of software not get packaged because it is just too hard to maintain. And software that doesn't get packaged will not get installed.

I find what I see here, pretty ridiculous. And this as well. If that must be done, then do it once, in some distutils setup, not 4 times, in gentoo ebuild, debian deb, redhat rpm, windows installer, and slackware package.

One final suggestion: don't use environment variables such as PYTHONPATH to tell gnumed where to find modules.
I don't get this. All modules (like wxPython) should be in site-packages, so any python program should find them fine.
When looking at the gnumed prerequisites, I don't see any of them being anywhere except for in site-packages. So python finds them fine.
The OP was probably also talking about GnuMed "modules" as in,
say .../client/python-common/
gnumed should find these no problem as long as there are in the path, so you could do

from gnumed.client.python-common import something

David J. Grant
M.A.Sc. Candidate in Electrical Engineering
a-Si and Integrated Circuits Lab
University of Waterloo
Room DC3707
519-888-4567 x2872

# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit distutils

DESCRIPTION="Scientific Algorithms Library for Python"



src_install() {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]