Changeset 11849


Ignore:
Timestamp:
04/01/12 15:22:14 (13 years ago)
Author:
Eric.Larour
Message:

Starting systematization of python modules

Location:
issm/trunk-jpl
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/m4/issm_options.m4

    r11848 r11849  
    303303                PYTHONLIB="-L$PYTHON_ROOT/lib -lpython3.2"
    304304                PYTHONEXT=.so
     305                PYTHONLINK="-dynamiclib"
    305306
    306307                AC_DEFINE([_HAVE_PYTHON_],[1],[with Python in ISSM src])
     
    309310                WRAPPEREXT=$PYTHONEXT
    310311                AC_SUBST([WRAPPEREXT])
     312                AC_SUBST([PYTHONLINK])
    311313        else
    312314                HAVE_PYTHON=no
  • issm/trunk-jpl/src/c/toolkits/toolkits.h

    r11733 r11849  
    1616#endif
    1717
     18#ifdef _HAVE_MATLAB_
     19#include "./matlab/matlabincludes.h"
     20#endif
     21
     22#ifdef _HAVE_PYTHON_
     23#include "./python/pythonincludes.h"
     24#endif
     25
    1826#include "./mpi/mpiincludes.h"
    1927#include "./metis/metisincludes.h"
    2028#include "./triangle/triangleincludes.h"
    21 #include "./matlab/matlabincludes.h"
    2229#include "./double/double.h"
    2330#include "./toolkitsenums.h"
  • issm/trunk-jpl/src/mex/Makefile.am

    r11846 r11849  
    127127endif
    128128
     129if PYTHON
     130AM_LDFLAGS = $(PYTHONLINK)
     131AM_CXXFLAGS=  -DNPY_NO_DEPRECATED_API
     132LDADD += $(BOOSTLIB) $(PYTHONLIB)
     133endif
     134
    129135#Triangle library
    130136AM_CXXFLAGS+=  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
  • issm/trunk-jpl/src/mex/Test/Test.cpp

    r11845 r11849  
    66#include "./Test.h"
    77
    8 using namespace boost::python;
    9 
    10 void mesh(boost::python::numeric::array array){
     8void Test(pyArray array){
    119
    1210        int i;
     
    2826}
    2927
    30 
    31 #include <boost/python/module.hpp>
    32 #include <boost/python/def.hpp>
    33 using namespace boost::python;
    34 
    3528BOOST_PYTHON_MODULE(Test){
    3629        boost::python::numeric::array::set_module_and_type( "numpy", "ndarray");
    37         //boost::python::numeric::array::set_module_and_type( "numpy", "array");
    38         def("mesh",mesh);
     30        def("Test",Test);
    3931}
  • issm/trunk-jpl/src/mex/Test/Test.h

    r11845 r11849  
    1414#include <numpy/arrayobject.h>
    1515
     16using namespace boost::python;
     17typedef boost::python::numeric::array pyArray;
     18
    1619#endif
Note: See TracChangeset for help on using the changeset viewer.