Changeset 7e6968
- Timestamp:
- 08/02/09 20:01:49 (4 years ago)
- Branches:
- master, python3
- Children:
- 014d05
- Parents:
- 36b305
- git-author:
- Tiago de Paula Peixoto <tiago@…> (08/02/09 13:56:19)
- git-committer:
- Tiago de Paula Peixoto <tiago@…> (08/02/09 20:01:49)
- Files:
-
- 4 edited
-
configure.ac (modified) (3 diffs)
-
src/graph/graph_bind.cc (modified) (4 diffs)
-
src/graph_tool/__init__.py (modified) (1 diff)
-
src/graph_tool/core.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
rd836b5 r7e6968 174 174 AC_ARG_WITH([numpy], [AC_HELP_STRING([--with-numpy=DIR], 175 175 [directory where numpy is installed 176 [default=${PY LIBDIR}/numpy] ])],176 [default=${PYTHON_SITE_PKG}/numpy] ])], 177 177 NUMPY_DIR=$withval) 178 NUMPY_DIR="${NUMPY_DIR}/core/include/numpy" 178 [NUMPY_DIR="${NUMPY_DIR}/core/include/numpy"] 179 179 AC_CHECK_HEADER([${NUMPY_DIR}/arrayobject.h], 180 180 [CPPFLAGS="${CPPFLAGS} -I${NUMPY_DIR}"], … … 187 187 AC_ARG_WITH([scipy], [AC_HELP_STRING([--with-scipy=DIR], 188 188 [scipy install directory 189 [default=${PY LIBDIR}/scipy] ])],189 [default=${PYTHON_SITE_PKG}/scipy] ])], 190 190 [SCIPY_DIR=$withval]) 191 191 AC_CHECK_HEADER([${SCIPY_DIR}/weave/scxx/object.h], … … 233 233 dnl Subst PYTHON_DIR. 234 234 AC_DEFINE_UNQUOTED([INSTALL_PREFIX],"${prefix}", [python prefix]) 235 AC_DEFINE_UNQUOTED([PYTHON_DIR], "${PY LIBDIR}", [The directory name for the site-packages subdirectory of the standard Python install tree.])235 AC_DEFINE_UNQUOTED([PYTHON_DIR], "${PYTHON_SITE_PKG}", [The directory name for the site-packages subdirectory of the standard Python install tree.]) 236 236 237 237 AC_DEFINE_UNQUOTED([CXXFLAGS],"${CXXFLAGS}", [c++ compilation options]) 238 238 AC_DEFINE_UNQUOTED([CPPFLAGS],"${CPPFLAGS}", [c++ preprocessor compilation options]) 239 AC_DEFINE_UNQUOTED([LDFLAGS],"${LDFLAGS}", [linker options]) 239 240 240 241 AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${packageprefix}/${packagedatadir}", [package data dir]) -
src/graph/graph_bind.cc
r684efc r7e6968 46 46 ", " GIT_COMMIT_DATE ")";} 47 47 string GetLicense() const {return "GPL version 3 or above";} 48 string GetCXXFLAGS() const {return C XXFLAGS " " CPPFLAGS;}48 string GetCXXFLAGS() const {return CPPFLAGS " " CXXFLAGS " " LDFLAGS;} 49 49 string GetInstallPrefix() const {return INSTALL_PREFIX;} 50 50 string GetPythonDir() const {return PYTHON_DIR;} 51 string GetGCCVersion() const 52 { 53 stringstream s; 54 s << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__; 55 return s.str(); 56 } 51 57 }; 52 58 … … 289 295 } 290 296 297 bool openmp_enabled() 298 { 299 #ifdef USING_OPENMP 300 return true; 301 #else 302 return false; 303 #endif 304 } 305 291 306 BOOST_PYTHON_MODULE(libgraph_tool_core) 292 307 { … … 304 319 305 320 def("graph_filtering_enabled", &graph_filtering_enabled); 321 def("openmp_enabled", &openmp_enabled); 306 322 307 323 mpl::for_each<mpl::push_back<scalar_types,string>::type>(export_vector_types()); … … 380 396 .add_property("cxxflags", &LibInfo::GetCXXFLAGS) 381 397 .add_property("install_prefix", &LibInfo::GetInstallPrefix) 382 .add_property("python_dir", &LibInfo::GetPythonDir); 398 .add_property("python_dir", &LibInfo::GetPythonDir) 399 .add_property("gcc_version", &LibInfo::GetGCCVersion); 383 400 384 401 def("get_graph_type", &get_graph_type); -
src/graph_tool/__init__.py
r11e049 r7e6968 95 95 from . core import __version__, Graph, GraphError, Vector_bool, \ 96 96 Vector_int32_t, Vector_int64_t, Vector_double, Vector_long_double,\ 97 Vector_string, value_types, load_graph, PropertyMap, Vertex, Edge 97 Vector_string, value_types, load_graph, PropertyMap, Vertex, Edge,\ 98 show_config 98 99 99 100 __all__ = ["Graph", "Vertex", "Edge", "GraphError", "Vector_bool", 100 101 "Vector_int32_t", "Vector_int64_t", "Vector_double", 101 102 "Vector_long_double", "Vector_string", "value_types", "load_graph", 102 "PropertyMap" ]103 "PropertyMap", "show_config"] -
src/graph_tool/core.py
r7da1f0 r7e6968 125 125 raise ValueError("invalid property value type: " + type_name) 126 126 127 def show_config(): 128 info = libcore.mod_info() 129 print "version:", info.version 130 print "gcc version:", info.gcc_version 131 print "compilation flags:", info.cxxflags 132 print "install prefix:", info.install_prefix 133 print "python dir:", info.python_dir 134 print "graph filtering:", libcore.graph_filtering_enabled() 135 print "openmp:", libcore.openmp_enabled() 136 print "uname:", " ".join(os.uname()) 127 137 128 138 ################################################################################
Note: See TracChangeset
for help on using the changeset viewer.


