Changeset 1501
- Timestamp:
- 02/11/09 12:54:51 (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r1469 r1501 56 56 ("rpfitslibdir", "The rpfits library location", None), 57 57 # ("rpfitsincdir", "The rpfits include location", None), 58 ("pyraproot", "The root directory where libpyrap is installed", 59 None), 60 ("pyraplib", "The name of the pyrap library", "pyrap"), 61 ("pyraplibdir", "The directory where libpyrap is installed", 62 None), 63 ("pyrapincdir", "The pyrap include location", 64 None), 65 BoolVariable("enable_pyrap", "Use pyrap conversion library", 66 True), 67 58 68 EnumVariable("mode", "The type of build.", "release", 59 69 ["release","debug"], ignorecase=1), … … 65 75 ["none", "pdf", "html"], ignorecase=1), 66 76 BoolVariable("apps", "Build cpp apps", False), 67 BoolVariable("alma", "Enable alma specific functionality", False) 77 BoolVariable("alma", "Enable alma specific functionality", 78 False), 68 79 ) 69 80 … … 113 124 114 125 conf.env.AddCustomPackage('boost') 115 if not conf.CheckLibWithHeader( env["boostlib"],126 if not conf.CheckLibWithHeader(conf.env["boostlib"], 116 127 'boost/python.hpp', language='c++'): 117 128 Exit(1) 129 130 conf.env.AddCustomPackage('pyrap') 131 if conf.env.get("enable_pyrap") and conf.CheckLib(conf.env["pyraplib"], 132 language='c++', 133 autoadd=0): 134 conf.env.Append(CPPFLAGS=['-DHAVE_PYRAP']) 135 conf.env.PrependUnique(LIBS=env['pyraplib']) 136 118 137 # test for cfitsio 119 138 if not conf.CheckLib("m"): Exit(1) -
trunk/src/python_asap.cpp
r1126 r1501 39 39 #include "ScantableWrapper.h" 40 40 41 #ifndef HAVE_LIBPYRAP 42 #include "pyconversions.h" 43 #else 44 #include <pyrap/Converters/PycExcp.h> 45 #include <pyrap/Converters/PycBasicData.h> 46 #endif 41 47 42 #include "pyconversions.h"43 48 #include "python_asap.h" 44 49 50 #ifndef HAVE_LIBPYRAP 45 51 namespace asap { 46 52 namespace python { 53 47 54 void translate_ex(const casa::AipsError& e) 48 55 { … … 53 60 } 54 61 } 62 #endif 63 55 64 using namespace boost::python; 56 65 … … 65 74 asap::python::python_STWriter(); 66 75 asap::python::python_LineCatalog(); 76 asap::python::python_Logger(); 67 77 68 asap::python::python_Logger(); 78 #ifndef HAVE_LIBPYRAP 79 // Use built-in pyconversions.h 69 80 register_exception_translator<casa::AipsError>(&asap::python::translate_ex); 70 71 //std_vector_to_tuple < > ();72 81 from_python_sequence < std::vector< asap::ScantableWrapper >, 73 82 variable_capacity_policy > (); 74 75 83 std_vector_to_tuple < int > (); 76 84 from_python_sequence < std::vector < int >, … … 91 99 from_python_sequence < std::vector < bool >, 92 100 variable_capacity_policy > (); 101 #else 102 casa::pyrap::register_convert_excp(); 103 casa::pyrap::register_convert_basicdata(); 104 casa::pyrap::register_convert_std_vector<asap::ScantableWrapper>(); 105 #endif 93 106 }
Note:
See TracChangeset
for help on using the changeset viewer.