- Add first draft of SWIG interface file, and create Python
loadable module. However, please note that: - All the methods accepting a Glib::ustring should not be exported, instead they should be replaced by wrapper functions accepting PyObject*. - The same thing applies to every other method accepting a ``non built-in'' data type - Return types should probably be wrapped, too - It may be a good idea to implement wrapper methods that print out the content of a C++ object, so that a Python user can do a simple "print schedStat". This is achieved by adding a "__str__()" method to the class. See the SWIG manual for further infos about returning const char* values. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@354 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
9b40d632eb
commit
b9c4813f11
3 changed files with 177 additions and 5 deletions
36
Makefile.am
36
Makefile.am
|
@ -113,8 +113,8 @@ distclean-local :
|
|||
# Program & library names
|
||||
bin_PROGRAMS = sgpemv2
|
||||
|
||||
sgpemv2_INCLUDES = -I@top_srcdir@
|
||||
sgpemv2_CPPFLAGS = \
|
||||
-I@top_srcdir@ \
|
||||
-DPYCDIR="\"$(pycdir)\"" \
|
||||
-DMODDIR="\"$(moddir)\"" \
|
||||
-DLOCALEDIR="\"$(localedir)\"" \
|
||||
|
@ -165,8 +165,8 @@ noinst_HEADERS = \
|
|||
# Program & library names
|
||||
pkglib_LTLIBRARIES = src/backend/libbackend.la
|
||||
|
||||
src_backend_libbackend_la_INCLUDES = -I@top_srcdir@
|
||||
src_backend_libbackend_la_CPPFLAGS = \
|
||||
-I@top_srcdir@ \
|
||||
-DPYCDIR="\"$(pycdir)\"" \
|
||||
-DMODDIR="\"$(moddir)\"" \
|
||||
-DLOCALEDIR="\"$(localedir)\"" \
|
||||
|
@ -207,6 +207,34 @@ noinst_HEADERS += \
|
|||
src/backend/slice.hh \
|
||||
src/backend/string_utils.hh
|
||||
|
||||
|
||||
# ############################################################
|
||||
#
|
||||
# C++ modules -> Python loadable modules
|
||||
#
|
||||
# ############################################################
|
||||
|
||||
proxies = src/backend/sgpem.py
|
||||
wrappers = src/backend/sgpem_wrap.cc
|
||||
|
||||
mod_LTLIBRARIES = _sgpem.la
|
||||
mod_PYTHON = $(proxies)
|
||||
|
||||
_sgpem_la_INTERFACES = sgpem.i
|
||||
|
||||
_sgpem_la_CPPFLAGS = \
|
||||
-I@top_srcdir@ \
|
||||
-I@top_srcdir@/src/backend \
|
||||
$(SWIG_PYTHON_CPPFLAGS) \
|
||||
$(GLIBMM_CFLAGS)
|
||||
_sgpem_la_LDFLAGS = -module $(GLIBMM_LDFLAGS) \
|
||||
-L@top_builddir@/src/backend
|
||||
_sgpem_la_LIBADD = src/backend/libbackend.la
|
||||
_sgpem_la_SOURCES = $(wrappers)
|
||||
|
||||
EXTRA_DIST += $(_sgpem_la_INTERFACES)
|
||||
MOSTLYCLEANFILES = $(proxies) $(wrappers)
|
||||
|
||||
# ############################################################
|
||||
#
|
||||
# source : libpyloader.la
|
||||
|
@ -215,8 +243,8 @@ noinst_HEADERS += \
|
|||
|
||||
pkglib_LTLIBRARIES += src/backend/pyloader/libpyloader.la
|
||||
|
||||
src_backend_pyloader_libpyloader_la_INCLUDES = -I@top_srcdir@
|
||||
src_backend_pyloader_libpyloader_la_CPPFLAGS = \
|
||||
-I@top_srcdir@ \
|
||||
-DPYCDIR="\"$(pycdir)\"" \
|
||||
-DMODDIR="\"$(moddir)\"" \
|
||||
-DLOCALEDIR="\"$(localedir)\"" \
|
||||
|
@ -239,7 +267,7 @@ noinst_HEADERS += \
|
|||
src/backend/pyloader/python_policy.hh \
|
||||
src/backend/pyloader/python_policy_manager.hh
|
||||
|
||||
mod_PYTHON = \
|
||||
mod_PYTHON += \
|
||||
src/backend/pyloader/Abstract.py \
|
||||
src/backend/pyloader/Policy.py
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue