installation
------------

* requirements
    - mxDateTime http://www.lemburg.com/files/python/mxDateTime.html
    - if you want to use the PDF render or GTK2 GUI, ReportLab 
      http://www.reportlab.com/download.html or python2.3-reportlab
    - Python
    - swig
    - scons http://www.scons.org/
    - txt2pdbdoc http://homepage.mac.com/pauljlucas/software/txt2pdbdoc/index.html
    - bison
    - python-reportlab
    - python-pisock
    - python-gtk2
    - python-gnome2-extras
    - python-pyparsing
    - python-glade2
    - python-gnome2
    - python-dateutil
    - python-tz

building
--------

Building is with 'scons'. If you do not have scons, you can probably
install it easily from your distribution providers package. If you
have trouble here, please let me know. I can distribute a local copy
of scons with jppy to avoid this requirement.

Just type scons in this directory.

scons -h will show you the possible options. Set them like this:

scons mx_datetime_includes=/usr/local/mx/includes \
      pisock_includes=/usr/local/pi/includes \
      prefix=/usr

This will save the options into a file called SCustomize, so next time
you can run 'scons'.

If you are building against a version of pilot-link that isn't
installed, then do:

scons pisock_includes=/home/nicholas/projects/pilot-link/include \
      rpathoverride=/home/nicholas/projects/pilot-link/libpisock/.libs

Which will also call the unit tests with LD_LIBRARY_PATH set. If you
want to play around, then remember to set LD_LIBRARY_PATH yourself. For example:

LD_LIBRARY_PATH=/home/nicholas/projects/pilot-link/libpisock/.libs ./ipython.sh 

The site-packages directory and Python headers are found by querying
the python process which is running scons. Please invoke scons with an
alternate python if desired:

 python2.1 `which scons`

scons -c will remove generated files.


testing
-------

scons will call the unit tests. You can do so yourself:

 LD_LIBRARY_PATH=/home/nicholas/projects/pilot-link/libpisock/.libs \
  ./tests/runTestRunner.py

If you want to explore, try

 LD_LIBRARY_PATH=/home/nicholas/projects/pilot-link/libpisock/.libs \
 ./ipython.sh

The ipython.sh script just sets a HOME so you don't mess with your
real jpilot databases until you are happy to.

running the glade gui without installing
----------------------------------------

Once you've built (using 'scons'), you could try running the GTK2
glade GUI like this:

 (cd jppy/gui/ ; PYTHONPATH="$PWD/../.."; export PYTHONPATH; ./jppy)

if you didn't want to install it first.

installation
------------

as root (or with sudo):

   scons install

will place a jppy directory into your site-packages.


common problems
---------------

If you're missing swig, you'll get this error:

scons: *** Source file: python_module_src/jpilot.i is static and is
not compatible with shared target: jppy/__jpilotmodule.so

Don't have an English PDA? You may have to change hard coded category
names (such as 'Unfiled') in gtk_model.py :-/
