bgl-python
bgl-python copied to clipboard
Boost Graph Library - Python interface. This is the repository with the imported repository from Douglas Gregor
Boost Graph Library Python Bindings - Version 0.9.5
Copyright (C) 2005-2007 Trustees of Indiana University
Authors: Douglas Gregor <dgregor -at- osl.iu.edu> Ben Martin <benjmart -at- indiana.edu> Andrew Lumsdaine <lums -at- osl.iu.edu>
This archive contains Python bindings for the Boost Graph Library. The Boost Graph Library is available as a part of the Boost libraries. Other important links:
Boost: http://www.boost.org Boost Graph Library: http://www.boost.org/libs/graph/doc/ BGL-Python bindings: http://www.osl.iu.edu/~dgregor/bgl-python/
This file contains:
- Build & Install instructions
- Getting Help
- License information
- History
Build & Install
The section describes how to build and install the BGL-Python bindings.
Installing Prebuilt binaries
Prebuild binaries might already be available for your
platform on the BGL-Python web site at:
http://www.osl.iu.edu/~dgregor/bgl-python/
To install pre-built binaries, use:
python setup.py install
By default, the BGL-Python bindings will be installed into the
appropriate Python site-packages directory (e.g.,
/usr/lib/python2.3/site-packages). However, there are several
alternative installation options that one can pass on the command
line:
--home=DIR This option will install the BGL-Python module
into the home directory DIR, with the Python
module stored in DIR/lib/python and supporting
shared libraries stored in DIR/lib. Be sure that
DIR/lib/python is in your PYTHONPATH and DIR/lib
is in your dynamic linker's path (e.g.,
LD_LIBRARY_PATH or DYLD_LIBRARY_PATH).
--exec-prefix=DIR This option will change the executable prefix used
to install BGL-Python as a site-wide
package. The BGL-Python module will be placed in
DIR/lib/pythonVERSION/site-packages and the
supporting libraries will be placed in DIR/lib.
--pythonlibdir=DIR This option will force the installer to place
the BGL-Python module in DIR.
--libdir=DIR This option will force the installer to place
the BGL-Python supporting libraries in DIR.
Prerequisites
~~~~~~~~~~~~~
- A very modern C++ compiler. We have tested with GNU C++ versions
3.3 and newer and Microsoft Visual C++ 7.1 and newer.
- Boost 1.34.0 or newer: At present, Boost 1.34.0 is only available
via Boost CVS. See http://www.boost.org for information about
retrieving Boost from CVS. Note: You must have a complete Boost
distribution available (e.g., retrieved via CVS or as part of a
Boost tarball) to compile the BGL-Python: the BGL-Python bindings
will not compile properly with already-installed Boost trees.
- Python 2.2 or newer. Be sure that the Python headers are
installed!
We will assume that the Boost distribution is in a directory we refer
to a BOOST_ROOT.
Boost.Jam
~~~~~~~~~
We use the Boost.Build system to build the Python bindings for the
BGL. The "Preparation" section at the following web page describes
how to build Boost.Jam, which is the core of the build system:
http://www.boost.org/more/getting_started.html#Preparation
However, most users can just enter the directory
$BOOST_ROOT/tools/jam/src
and run either build.sh (for Unix-like systems) or build.bat (for
Windows). Copy the "bjam" executable from this step some place
convenient: we'll be using it to build the Python bindings.
Python Configuration
~~~~~~~~~~~~~~~~~~~~
The BGL-Python bindings use the excellent Boost.Python library to
reflect the C++ data structures and algorithms into Python. Although
we build the Boost.Python library automatically, you may still need
to follow the configuration advice here:
http://www.boost.org/libs/python/doc/building.html
Most likely, you will only need to add the following to your
user-config.jam:
using python : 2.3 ;
Replace "2.3" with the major and minor version of Python you have,
e.g., 2.2., 2.3, 2.4, or 2.5.
Build & Install
~~~~~~~~~~~~~~~
Once you have determined which Boost.Jam options you will need, change
to the top-level BGL-Python directory and run bjam:
bjam <options> install
By default, the BGL-Python bindings will be installed into the
appropriate Python site-packages directory (e.g.,
/usr/lib/python2.3/site-packages). However, the same installation
options are available here as for the setup.py script in the pre-built
binaries:
--home=DIR This option will install the BGL-Python module
into the home directory DIR, with the Python
module stored in DIR/lib/python and supporting
shared libraries stored in DIR/lib. Be sure that
DIR/lib/python is in your PYTHONPATH and DIR/lib
is in your dynamic linker's path (e.g.,
LD_LIBRARY_PATH or DYLD_LIBRARY_PATH).
--exec-prefix=DIR This option will change the executable prefix used
to install BGL-Python as a site-wide
package. The BGL-Python module will be placed in
DIR/lib/pythonVERSION/site-packages and the
supporting libraries will be placed in DIR/lib.
--pythonlibdir=DIR This option will force the installer to place
the BGL-Python module in DIR.
--libdir=DIR This option will force the installer to place
the BGL-Python supporting libraries in DIR.
------------
Getting Help
------------
The Python interface to the BGL contains extensive on-line help. Use
the help() command in Python or pydoc to view help for any of the
components or algorithms of the BGL. If you are still having trouble,
feel free to contact us via the Boost-Users or Boost mailing lists at:
http://www.boost.org/more/mailing_lists.htm
-------
License
-------
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-------
History
-------
- February 1, 2007 - Version 0.9.5 of BGL-Python bindings.
Improvements include:
- Vertex/edge properties are available as attributes in vertex
and edge objects
- Vertex/edge objects now have stable addresses, so they can be
used as keys in Python dicts.
- Property maps now perform automatic conversions to the
appropriate underlying type.
- More BGL algorithms are available in Python
- Added GraphML input/output
- Pickling/unpickling of BGL graphs now works properly
- November 23, 2005 - Version 0.9 of BGL-Python bindings. The
initial release as a separate package.
- August 11, 2005 - Initial, experimental version of BGL-Python
bindings released as part of Boost version 1.33.0.