changeset 121:c45f957ef4d9

Add NumPy include path to setup; remove PyAPI stuff from non-PyAPI calls
author Chris Cannam
date Tue, 23 Jun 2015 10:43:08 +0100
parents 7c0c11577819
children 26f75b221828
files native/PyPluginObject.h native/PyRealTime.h setup.py
diffstat 3 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/native/PyPluginObject.h	Mon Jun 22 16:31:44 2015 +0100
+++ b/native/PyPluginObject.h	Tue Jun 23 10:43:08 2015 +0100
@@ -57,10 +57,10 @@
     PyObject *programs;
 };
 
-PyAPI_DATA(PyTypeObject) Plugin_Type;
+extern PyTypeObject Plugin_Type;
 #define PyPlugin_Check(v) PyObject_TypeCheck(v, &Plugin_Type)
 
-PyAPI_FUNC(PyObject *)
+extern PyObject *
 PyPluginObject_From_Plugin(Vamp::Plugin *);
 
 #endif
--- a/native/PyRealTime.h	Mon Jun 22 16:31:44 2015 +0100
+++ b/native/PyRealTime.h	Tue Jun 23 10:43:08 2015 +0100
@@ -46,15 +46,15 @@
     Vamp::RealTime *rt;
 } RealTimeObject; 
 
-PyAPI_DATA(PyTypeObject) RealTime_Type;
+extern PyTypeObject RealTime_Type;
 
 #define PyRealTime_Check(v) PyObject_TypeCheck(v, &RealTime_Type)
 #define PyRealTime_AS_REALTIME(v) ((const RealTimeObject* const) (v))->rt
 
-PyAPI_FUNC(PyObject *) 
+extern PyObject *
 PyRealTime_FromRealTime(const Vamp::RealTime&);
 
-PyAPI_FUNC(const Vamp::RealTime*) 
+extern const Vamp::RealTime *
 PyRealTime_AsRealTime (PyObject *self);
 
 #endif
--- a/setup.py	Mon Jun 22 16:31:44 2015 +0100
+++ b/setup.py	Tue Jun 23 10:43:08 2015 +0100
@@ -1,4 +1,5 @@
 from distutils.core import setup, Extension
+import numpy as np
 
 sdkdir = 'vamp-plugin-sdk/src/vamp-hostsdk/'
 vpydir = 'native/'
@@ -12,7 +13,7 @@
 
 vampyhost = Extension('vampyhost',
                       sources = srcfiles,
-                      include_dirs = [ 'vamp-plugin-sdk' ])
+                      include_dirs = [ 'vamp-plugin-sdk', np.get_include() ])
 
 setup (name = 'vamp',
        version = '1.0',