2.2.1 Installation on POSIX and MacOS/X

The installation procedure consists of three steps:

  1. Unpack PyQwt3D-0.1.6.tar.gz.
  2. Do a quick start to test the installation by running the commands:
    cd PyQwt3D-0.1.6
    cd configure
    python configure.py -Q ../qwtplot3d-0.2.7
    make
    make install
    
    where the directory /sources/of/qwtplot3d must contain the directories 3rdparty, include and src.
    The installation will fail if Qt has been configured without runtime type information (RTTI). In this case, run the commands:
    cd PyQwt3D-0.1.6
    cd configure
    python configure.py -Q /sources/of/qwtplot3d --extra-cxxflags=-frtti
    make
    make install
    
    where -frtti enables RTTI for g++. Check your compiler documention for other C++ compilers.
  3. Fine tune (optional)

Warning: The patched version of QwtPlot3D-0.2.7 included in PyQwt3D is required to enable saving of plots to the SVG and PGF vector file formats. In addition, you have to define HAVE_ZLIB and HAVE_LIBPNG to enable pixmaps in the SVG driver of GL2PS. A minimal configuration example is
python configure.py -Q ../qwtplot3d-0.2.7 -D HAVE_ZLIB -D HAVE_LIBPNG \
    -l z -l png
which may need extra options to indicate the location of the headers and libraries of libpng and zlib. For instance, a configuration example for Mac OS X with libpng from MacPorts is:
python configure.py -Q ../qwtplot3d-O.2.7 -I /opt/local/include \
    -L /opt/local/lib -D HAVE_ZLIB -D HAVE_LIBPNG -l z -l png

Note: PyQwt-0.1.6/GNUmakefile is makefile for GNU make which contains more examples of how to invoke configure.py. Adapt and use it, if you have GNU make.

Note: If you run into problems, send a log to the mailing list.

There are at least two options to log the output of make:

  1. Invoke make, tie stderr to stdout, and redirect stdout to LOG.txt:
    # For Qt-3
    make 3 2&>1 >LOG.txt
    # For Qt-4
    make 4 2&>1 >LOG.txt
    
    However, you do not see what is going on.
  2. Use script to capture all screen output of make to LOG.txt:
    # For Qt-3
    script -c 'make 3' LOG.txt
    # For Qt-4
    script -c 'make 4' LOG.txt
    
    The script command appeared in 3.0BSD and is part of util-linux.

Note: The configure.py script takes many options. The command
python configure.py -h
displays a full list of the available options:
Usage: python configure.py [options]

Each option takes at most one argument, but some options
accumulate arguments when repeated. For example, invoke:

	python configure.py -I . -I ..

to search the current *and* parent directories for headers.

Options:
  -h, --help            show this help message and exit

  Common options:
    -3, --qt3           build for Qt3 and PyQt [default Qt4]
    -4, --qt4           build for Qt4 and PyQt4 [default Qt4]
    -Q /sources/of/qwtplot3d, --qwtplot3d-sources=/sources/of/qwtplot3d
                        compile and link the QwtPlot3D source files in
                        /sources/of/qwtplot3d statically into PyQwt3D
                        (required on Windows)
    -Z /sources/of/zlib, --zlib-sources=/sources/of/zlib
                        compile and link the QwtPlot3D source files in
                        /sources/of/zlib statically into PyQwt3D (the -Z
                        option is ignored without the -Q option)
    -D HAVE_ZLIB, --extra-defines=HAVE_ZLIB
                        add an extra preprocessor definition (HAVE_ZLIB
                        enables compression of EPS/PDF/PS/SVG output and
                        HAVE_LIBPNG enables pixmaps in the SVG output, but
                        both defines are ignored without the -Q option)
    -I /usr/include/qwtplot3d, --extra-include-dirs=/usr/include/qwtplot3d
                        add an extra directory to search for headers (the
                        compiler must be able to find the QwtPlot3D headers
                        without the -Q option)
    -L /usr/lib/qt3/lib, --extra-lib-dirs=/usr/lib/qt3/lib
                        add an extra directory to search for libraries (the
                        linker must be able to find the QwtPlot3D library
                        without the -Q option)
    -j N, --jobs=N      concatenate the SIP generated code into N files
                        [default 1 per class] (to speed up make by running
                        simultaneous jobs on multiprocessor systems)
    -l z, --extra-libs=z
                        add an extra library (to link the zlib library, you
                        must specify "zlib" or "zlib1" on Windows and "z" on
                        POSIX and MacOS/X)

  Make options:
    --debug             enable debugging symbols [default disabled]
    --extra-cflags=EXTRA_CFLAG
                        add an extra C compiler flag
    --extra-cxxflags=EXTRA_CXXFLAG
                        add an extra C++ compiler flag
    --extra-lflags=EXTRA_LFLAG
                        add an extra linker flag

  SIP options:
    -x EXTRA_SENSORY_PERCEPTION, --excluded-features=EXTRA_SENSORY_PERCEPTION
                        add a feature for SIP to exclude (normally one of the
                        features in sip/features.sip)
    -t ESP_3_2_1, --timelines=ESP_3_2_1
                        add a timeline for SIP to adapt to a library version
                        (normally one of the timeline options in
                        sip/timelines.sip)
    --sip-include-dirs=SIP_INCLUDE_DIR
                        add an extra directory for SIP to search
    --trace             enable trace of the execution of the bindings [default
                        disabled]

  Detection options:
    --disable-numarray  disable detection and use of numarray [default
                        enabled]
    --disable-numeric   disable detection and use of Numeric [default enabled]
    --disable-numpy     disable detection and use of NumPy [default enabled]

  Install options:
    --module-install-path=MODULE_INSTALL_PATH
                        specify the install directory for the Python modules