Overview

From PyWiki

Jump to: navigation, search

Contents

Building Python-Ogre from Source

Building Python-Ogre from source consists of 3 primary steps

  • Build the C++ libraries to be wrapped
  • Generate the wrapper code
  • Build the Python Modules

The best way to understand the overall process is to look at the Linux build instructions and scripts.

However it's probably worth understanding the layout of Python-Ogre and the code generation process.

Directory Layout

The following can be found in the python-ogre directory

  • boost Additional files that we copy over the standard boost install to give more complete Python support
  • code_generators Programs to generate the wrappers
    • cache Storage for the gccxml 'XML' files so we don't have to read the source C++ header files every time
    • common_utils Helper Python module for the code generation
    • ogre Indivudal generator directories for each library we are wrapping
    • ois
    • template A default wrapper module that can serve as a basis for new generators
    • ...
  • demos Can't have a graphics package without demos
    • media Common media for the demos
    • ogre A demo directory per library (typically)
    • ...
  • generated The C++ wrapper source is stored here
    • ogre_1.4 One directory per module
    • ...
  • patch Sometimes we have to patch the underlying C++ code or build system :(
  • packages_2.x Somewhere to store the actual Python modules so they can be used
  • ThirdParty Lirbaries that we wrap that I consider small enough to include in the Python-Ogre SVN
  • Scripts The older Linux install scripts and helper batch files I use for the windows build

Important Files

Ok, so to be politically correct, all files are important, it just that some are more so than others :) In the root (python-ogre) directory you will find:

== File == == Description ==
Setup.py Used to install the modules into the system python module location
environment.py The main configuration file. Basically an entry per module that is going to be wrapped.
BuildModule.py THE worker program. This is used to retrieve, build, generate wrapper and compile the python modules !!
PythonOgreConfig_nt.py
PythonOgreConfig_posix.py
Specific for each platform. It gives the base locations for the library sources
SConstruct Scons build configuration file

Creating a new wrapper

To create a new wrapper go here

Personal tools