-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
224 lines (162 loc) · 8.11 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
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.