gnumed-devel
[Top][All Lists]
Advanced

[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 setup.py 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 setup.py 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() {
DOCS="README TODO LICENSE ...."
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 setup.py 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, http://people.debian.org/~tille/packages/gnumed/debian/gnumed-snapshot-common.install pretty ridiculous. And this http://people.debian.org/~tille/packages/gnumed/debian/gnumed-snapshot-client.install 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.
ACK.
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
http://www.eng.uwaterloo.ca/~djgrant


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

inherit distutils

IUSE=""
DESCRIPTION="Scientific Algorithms Library for Python"
MY_P="SciPy-0.2.0_alpha_200.4161"
SRC_URI="http://www.scipy.org/site_content/downloads/${MY_P}_src.tar.gz";
HOMEPAGE="http://www.scipy.org";
SLOT="0"
LICENSE="BSD"
KEYWORDS="~x86"

S=${WORKDIR}/${MY_P}

DEPEND="virtual/python
        >=dev-lang/python-2.1
        >=dev-python/numeric-20
        >=dev-python/wxPython-2.4
        >=dev-libs/fftw-2.1
        >=dev-libs/atlas-3.2.1
        >=dev-python/f2py-2.23.190.1367"

src_install() {
        DOCS="FORMAT_GUIDELINES.TXT LICENSE.TXT PKG-INFO THANKS.txt"
        distutils_src_install
}

reply via email to

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