Hi,
I attach a SConstruct file which should work with the 1.33.0-1 Boost
sources. Just drop it into libs/graph/src/python in the Boost 1.33 sources
and type scons.
I wrote this because I can never get Jam files to work, and find scons
easier.
Boost Graph and Boost Python dev files for 1.33 will need to be installed
to compile against.
Faheem.
#!/usr/bin/python
import os
# For Python interface only
cpp = ["../read_graphviz_spirit.cpp"]
pif = Split("module.cpp graph.cpp digraph.cpp "+
"graphviz.cpp "+
"breadth_first_search.cpp depth_first_search.cpp "+
"dijkstra_shortest_paths.cpp bellman_ford_shortest_paths.cpp
dag_shortest_paths.cpp "+
"kruskal_min_spanning_tree.cpp prim_minimum_spanning_tree.cpp
connected_components.cpp "+
"strong_components.cpp biconnected_components.cpp
incremental_components.cpp "+
"topological_sort.cpp transitive_closure.cpp isomorphism.cpp
betweenness_centrality.cpp "+
"sequential_vertex_coloring.cpp cuthill_mckee_ordering.cpp
king_ordering.cpp "+
"circle_layout.cpp fruchterman_reingold.cpp "+
"kamada_kawai_spring_layout.cpp page_rank.cpp pickle.cpp")
boost_python_env = Environment(#CXX="g++-4.0",
CPPPATH=["/usr/include/python2.3"],
CXXFLAGS="-ftemplate-depth-100 -Wall -g -O3",
#CPPDEFINES=['PRINT_DIAGNOSTIC', 'PASSING_SEED_FROM_PYTHON'],
CPPDEFINES=['BOOST_PYTHON_DYNAMIC_LIB'],
LIBPATH=["/usr/lib/python2.3/config"],
LIBS=["python2.3", "m"],
SHLIBPREFIX="", #gets rid of lib prefix
)
# Check if running on Debian Sarge 3.1
if os.path.isfile('/etc/debian_version') and os.popen('cat
/etc/debian_version').readline() == '3.1\n':
boost_python_env.Append(LIBS = ["bgl-viz", "boost_python"])
#Otherwise, check if running on Duke cluster.
elif 'cluster' in os.popen('uname -a').readline():
boost_python_env.Append(LIBS = "boost_python-gcc")
Default('.')
#env.SharedLibrary(target = 'msi', source = cppfiles)
boost_python_env.SharedLibrary(target='bgl', source=cpp+pif)