diff --git a/pyext/Makefile.am b/pyext/Makefile.am index 49247bf..fb087eb 100755 --- a/pyext/Makefile.am +++ b/pyext/Makefile.am @@ -62,6 +62,7 @@ BUILT_SOURCES = gammalib/app_wrap.cpp gammalib/app.py \ gammalib/sky_wrap.cpp gammalib/sky.py \ gammalib/support_wrap.cpp gammalib/support.py \ gammalib/xml_wrap.cpp gammalib/xml.py \ + gammalib/xspec_wrap.cpp gammalib/xspec.py \ gammalib/test_wrap.cpp gammalib/test.py \ $(INST_SWIG_TARGETS) diff --git a/pyext/gammalib/xspec.i b/pyext/gammalib/xspec.i new file mode 100644 index 0000000..ee05ceb --- /dev/null +++ b/pyext/gammalib/xspec.i @@ -0,0 +1,52 @@ +/*************************************************************************** + * xspec.i - XSPEC module * + * ----------------------------------------------------------------------- * + * copyright (C) 2013 by Juergen Knoedlseder * + * ----------------------------------------------------------------------- * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + * * + * ----------------------------------------------------------------------- * + * Usage: * + * swig -c++ -python -Wall xspec.i * + ***************************************************************************/ +/** + * @file xspec.i + * @brief XSPEC module + * @author Juergen Knoedlseder + */ +%module xspec +%feature("autodoc", "1"); + +/* __ Headers needed for compilation _____________________________________ */ +%{ +#include +#include "GException.hpp" +#include "GTools.hpp" +%} + +/* __ Include standard typemaps for vectors and strings __________________ */ +%include stl.i + +/* __ Include interface classes __________________________________________ */ +%import(module="gammalib.base") "GBase.i"; +//%import(module="gammalib.base") "GContainer.i"; + +/* __ Make sure that exceptions are catched ______________________________ */ +%import(module="gammalib.support") "GException.i"; + +/* __ Application module _________________________________________________ */ +%include "GArf.i" +%include "GPha.i" +%include "GRmf.i" diff --git a/pyext/setup.py.in b/pyext/setup.py.in index 2ff57e2..6819d3b 100644 --- a/pyext/setup.py.in +++ b/pyext/setup.py.in @@ -1,7 +1,7 @@ ############################################################################# # Disutils setup file for gammalib Python extension module # # ------------------------------------------------------------------------- # -# Copyright (C) 2011-2012 Juergen Knoedlseder # +# Copyright (C) 2011-2013 Juergen Knoedlseder # # ------------------------------------------------------------------------- # # # # This program is free software: you can redistribute it and/or modify # @@ -31,7 +31,7 @@ pkg_name = 'gammalib' # Define core modules core_modules = ['app', 'base', 'fits', 'linalg', 'model', 'numerics', \ - 'obs', 'opt', 'sky', 'support', 'test', 'xml'] + 'obs', 'opt', 'sky', 'support', 'test', 'xml', 'xspec'] # Detect execution mode is_build = True