=========================================================================
Requirements
=========================================================================

- Ice 3.1.0
- Python 2.3 or 2.4 built with a C++ compiler compatible with C++
  compiler used to build Ice for C++.

Depending on your platform, you may need to download the Python source
distribution from http://www.python.org and make our own Python build.

You can use the Ice for C++ binary distribution for your platform to
build the Ice extension for Python.

=========================================================================
Building the Ice extension for Python (Linux/Solaris/HP-UX/Mac OS X)
=========================================================================

Follow these steps to build the Ice extension for Python:

1) Edit config/Make.rules and do the following:

   * Modify the installation prefix (if necessary).

   * Review the comments describing the PYTHON_HOME variable.

2) Execute 'python -V' to verify that the correct Python interpreter
   is in your executable search path.

3) Run 'make'.

4) Upon successful completion, run 'make install'. You may need
   additional user priveleges to install in the directory specified by
   config/Make.rules.

5) See "Configuring your Environment" below.


=========================================================================
Building the Ice extension for Python (Windows)
=========================================================================

The Python interpreter is readily available on Windows platforms. You
can build it yourself using Microsoft Visual C++, or obtain a binary
distribution from the Python web site (http://www.python.org).

Follow these steps to build the Ice extension for Python:

1) Configure Visual C++ so that it can find the Ice and Python include
   files and libraries.

   If Python is installed in C:\Python24, then you need to add
   C:\Python24\include as the include directory and C:\Python24\libs
   as the library directory.

2) Open the "all.dsw" workspace. If you are using Visual C++ .NET, the
   project files will first need to be converted from the Visual C++
   6.0 format.

3) Set your active project to "IcePy". Note that the default
   configuration is a Debug build, which requires that the debug
   libraries be available for Python and Ice. (The debug library is
   not included in the binary distribution from python.org.)

   The project assumes you are building an extension for Python 2.4.
   If you are using Python 2.3, you will need to modify the project
   settings to use the Python 2.3 library.

4) Build the "IcePy" project.

5) See "Configuring your Environment" below.

NOTES:

 * When compiling the Python interpreter from sources using Microsoft
   Visual C++ 6.0, the presence of the STLport header files causes a
   compilation error. The solution is to temporarily remove or rename
   the STLport include directory in your Visual C++ settings using
   Tools/Options/Directories/Include files.


=========================================================================
Configuring your Environment
=========================================================================

Unix:

   Modify your PYTHONPATH environment variable to include the Ice 
   extension for Python. Assuming you installed the extension in the
   default directory (/opt/IcePy-3.1.0), you would modify your
   environment as shown below:

   export ICEPY_HOME=/opt/IcePy-3.1.0
   export PYTHONPATH=$ICEPY_HOME/python:$PYTHONPATH

Windows:

   Modify your environment to allow Python to find the Ice extension for 
   Python. The interpreter must be able to locate the extension DLL as
   well as the Python source files in the "python" subdirectory.
   This is normally accomplished by setting the PYTHONPATH environment
   variable to contain the necessary subdirectories. For example, if
   the Ice for Python extension is installed in C:\IcePy-3.1.0, you
   could configure your environment as follows:

   set ICEPY_HOME=C:\IcePy-3.1.0
   set PYTHONPATH=%ICEPY_HOME%\python


=========================================================================
Running the Tests
=========================================================================

The test subdirectory contains Python implementations of the core Ice
test suite.

To run all of the tests, do the following:

$ python allTests.py

You can also run tests individually by changing to the test directory
and running this command:

$ python run.py


=========================================================================
HP-UX Notes
=========================================================================

Python needs to be configured and built with the following options in
order to successfully load the Ice extension:

./configure --enable-shared --with-cxx="aCC -AA +DAportable" \
--with-libs="-lxnet" ...

=========================================================================
Solaris Notes
=========================================================================

Python needs to be configured and built with the following options in
order to successfully load the Ice extension:

./configure --enable-shared --with-cxx=CC --without-gcc ...
