[beast: 6/10] BSE: pybse: build 'Bse.so' Python module
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 6/10] BSE: pybse: build 'Bse.so' Python module
- Date: Sun, 20 Mar 2016 17:56:26 +0000 (UTC)
commit 6f125c0d10c27ccb0eacccf6e9016602faa5e00f
Author: Tim Janik <timj gnu org>
Date: Sun Jan 24 18:02:30 2016 +0100
BSE: pybse: build 'Bse.so' Python module
Signed-off-by: Tim Janik <timj gnu org>
bse/pybse/Bse.pyx | 10 ++++++++++
bse/pybse/Makefile.am | 13 ++++++++++++-
2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/bse/pybse/Bse.pyx b/bse/pybse/Bse.pyx
new file mode 100644
index 0000000..9fc07b5
--- /dev/null
+++ b/bse/pybse/Bse.pyx
@@ -0,0 +1,10 @@
+# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0 -*-mode:python;-*-
+include "Aida.pyx"
+
+# Generated Bse bindings (via PyxxStub.py)
+include "bseidlapi.pyx"
+
+# Provide main Bse singleton
+cdef extern from "bse/bse.hh" namespace "Bse":
+ Bse__Server Bse__init_server_instance "Bse::init_server_instance" ()
+server = Bse__Object__wrap (Bse__init_server_instance())
diff --git a/bse/pybse/Makefile.am b/bse/pybse/Makefile.am
index d79eb00..b9c1c09 100644
--- a/bse/pybse/Makefile.am
+++ b/bse/pybse/Makefile.am
@@ -13,13 +13,24 @@ AIDACC_VDEBUG = $(AIDACC) $(if $(findstring 1, $(V)), --aida-debug)
# == Pyx ==
AIDASTDINC = $(shell ${AIDACC} -x PyxxStub.py -G --print-include-path /dev/null)
# Python 'Bse' module build via Cython
+Bse.pyx: bseidlapi.pyx
bseidlapi.pyx: ../bseapi.idl
$(AM_V_GEN)
$(Q) ${AIDACC} -x PyxxStub.py $< -o $@ -G strip-path=$(abs_top_srcdir)/
+Bse.cc: Bse.pyx bseidlapi.pyx
+ @echo " CYTHON " $@
+ $(Q) cython --cplus -Wextra -Werror --fast-fail -I. -I$(AIDASTDINC) Bse.pyx -o $@
+ @: # FIXME: CYTHON
# pythondir = ${prefix}/lib/pythonX.Y/site-packages
pymodulesdir = ${bselibdir}/pymodules
+pymodules_LTLIBRARIES = Bse.la
# Pyx Bse module
-CLEANFILES += bseidlapi.pyx
+nodist_Bse_la_SOURCES = Bse.cc # nodist_ forces build time generation
+Bse_la_CXXFLAGS = $(PYTHON_CPPFLAGS) $(AM_CXXFLAGS) -I$(AIDASTDINC) -Wno-redundant-decls
-Wno-unused-function
+Bse_la_LDFLAGS = $(PYTHON_LDFLAGS) $(AM_LDFLAGS) -no-undefined -module -avoid-version
+Bse_la_LIBADD = $(RAPICORN_LIBS) ../libbse- MAJOR@.la # $(top_builddir)/bse/libbse- MAJOR@.la
+EXTRA_DIST += Bse.pyx
+CLEANFILES += bseidlapi.pyx Bse.cc
# call python with uninstalled or fully installed modules
FPYTHON = PYTHONPATH="$$PYTHONPATH:${pymodulesdir}" $(PYTHON)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]