incubator-bloodhound-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olemis Lang <ole...@gmail.com>
Subject Re: svn commit: r1297104 - in /incubator/bloodhound/trunk/installer: ./ LICENSE NOTICE README.rst createdigest.py installer.py pgrequirements.txt requirements.txt
Date Wed, 07 Mar 2012 12:41:16 GMT
I repeat ...
:-/

On Wed, Mar 7, 2012 at 7:39 AM, Olemis Lang <olemis@gmail.com> wrote:
> On Mon, Mar 5, 2012 at 11:17 AM, Gary <gary.martin@wandisco.com> wrote:
>>
[...]
>> I just thought that with this commit I would let you know that I have written an
installer of sorts. It definitely needs more testing (I have stuck with Ubuntu 11.10 for this
initial work) but it might serve as a reasonable starting point to get people able to be more
involved, at least in the short term.
>>
>>
>

My only suggestion here is to provide a separate function so as to
populate options parser and reuse it inside main . The reason for
doing this is to ease the task of writing more complex (Python)
scripts by embedding Bloodhound installer rather than invoking it as
an external script , i.e. something like this :

{{{
#!py

def custom_installer():
    parser = OptionParser(*args)
    add_bloodhound_options(parser)
    add_someother_options(parser)

    options, args = parser.parse_options()

        install_result = install_bloodhound(options, args)          #
<= this one will be `main`
        install_result = install_yetanother_app_or_plugin(options, args)
        return install_result

}}}

... this may be useful
;)

-- 
Regards,

Olemis.

Mime
View raw message