Changeset 1501 for trunk/src


Ignore:
Timestamp:
02/11/09 12:54:51 (16 years ago)
Author:
Malte Marquarding
Message:

support linking against pyrap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/python_asap.cpp

    r1126 r1501  
    3939#include "ScantableWrapper.h"
    4040
     41#ifndef HAVE_LIBPYRAP
     42  #include "pyconversions.h"
     43#else
     44  #include <pyrap/Converters/PycExcp.h>
     45  #include <pyrap/Converters/PycBasicData.h>
     46#endif
    4147
    42 #include "pyconversions.h"
    4348#include "python_asap.h"
    4449
     50#ifndef HAVE_LIBPYRAP
    4551namespace asap {
    4652  namespace python {
     53
    4754void translate_ex(const casa::AipsError& e)
    4855{
     
    5360  }
    5461}
     62#endif
     63
    5564using namespace boost::python;
    5665
     
    6574  asap::python::python_STWriter();
    6675  asap::python::python_LineCatalog();
     76  asap::python::python_Logger();
    6777
    68   asap::python::python_Logger();
     78#ifndef HAVE_LIBPYRAP
     79  // Use built-in pyconversions.h
    6980  register_exception_translator<casa::AipsError>(&asap::python::translate_ex);
    70 
    71   //std_vector_to_tuple <  > ();
    7281  from_python_sequence < std::vector< asap::ScantableWrapper >,
    7382    variable_capacity_policy > ();
    74 
    7583  std_vector_to_tuple < int > ();
    7684  from_python_sequence < std::vector < int >,
     
    9199  from_python_sequence < std::vector < bool >,
    92100    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
    93106}
Note: See TracChangeset for help on using the changeset viewer.