Re: [OVC-demo-team] Need BRP Package Posted to SF

From: David Mertz <voting-project_at_gnosis_dot_cx>
Date: Sun Apr 11 2004 - 21:51:48 CDT

Hi Eron,
        
> I'm working on developing a self-hosting environment to ship as a
> single
> package. So far, I've got a pre-built binary of Python with PyQt/SIP/Qt
> built-in to the interpreter. I need to figure out the best way to
> execute the
> programs generically from here (probably ENV variables for now).

I do not have much experience in producing nice self-contained bundles
of Python apps with support library dependencies. So I can't be of as
much help as I would like.

However, what seems to me as a good approach is to create an ISO image
that contains all the necessary support files, including the evm2003
and gnosis packages. The Python binary with linked in PyQt/SIP/Qt can
live on this CD. Perhaps a script 'setup' could configure the CD
content for use in a specified local directory on the harddisk (since
the stored/ and scanned/ and finalized/ directories need to be
writeable. Running 'setup' might work something like the below:

   % mkdir /home/evm/brp
   % cd /home/evm/brp
   % /mnt/cdrom/setup
   % ./run_brp # generated launch script

I'm not 100% sure what 'setup' might need to do, but it will probably
include something like:

   #!/bin/bash
   CD=${0%setup}
   cp ${CD}acl.txt $PWD
   cp ${CD}votestations.txt $PWD
   cp ${CD}wizard.py $PWD

   cat > run_brp <<-EOF
           export PYTHONPATH=$CD # set pythonpath to CD
           ${CD}bin/python wizard.py
   EOF

The generated 'run_brp' file will look something like:

   $ cat run_brp
   export PYTHONPATH=/mnt/cdrom/ # set pythonpath to CD
   /mnt/cdrom/bin/python wizard.py

It's quite possible that some more steps are needed that I didn't think
of, but you see where I'm going. As much as possible, we want to rely
on strictly files from the CD--this will avoid version inconsistencies
and the like. I suppose 'acl.txt' and 'votestations.txt' should be
customized for a particular installation too. And maybe wizard.py
should run from CD (but I figured if on HDD it could be tweaked).
==================================================================
= The content of this message, with the exception of any external
= quotations under fair use, are released to the Public Domain
==================================================================
Received on Sat Nov 22 03:47:12 2008

This archive was generated by hypermail 2.1.8 : Sat Nov 22 2008 - 03:47:30 CST