ref: 7dd8b0498e050b844df7ac77556aa7a3d3fb87a9
parent: 0b5b7b22230e41f8a315e1f8b78849286d9da152
parent: 9ccd89fae4ed7a7975483fa5fd6001dc8388f826
author: Paul Brossier <piem@piem.org>
date: Sun Jul 15 11:16:24 EDT 2012
Merge branch 'develop' into io
--- a/interfaces/python/aubiowraphell.h
+++ b/interfaces/python/aubiowraphell.h
@@ -7,15 +7,6 @@
PARAMS; \
} Py_## NAME;
-#define AUBIO_NEW(NAME) \
-static PyObject * \
-Py_ ## NAME ## _new (PyTypeObject * type, PyObject * args, PyObject * kwds) \
-{ \
- Py_ ## NAME * self; \
- self = (Py_ ## NAME *) type->tp_alloc (type, 0); \
- return (PyObject *)self; \
-}
-
#define AUBIO_INIT(NAME, PARAMS... ) \
static int \
Py_ ## NAME ## _init (Py_ ## NAME * self, PyObject * args, PyObject * kwds) \
@@ -22,6 +13,7 @@
{ \
self->o = new_aubio_## NAME ( PARAMS ); \
if (self->o == NULL) { \
+ PyErr_SetString (PyExc_StandardError, "error creating object"); \
return -1; \
} \
\
--- a/interfaces/python/build_osx
+++ b/interfaces/python/build_osx
@@ -1,6 +1,9 @@
#! /bin/sh
-export CFLAGS=-I/Users/piem/Library/Python/2.7/site-packages/numpy-1.8.0.dev_436a28f_20120710-py2.7-macosx-10.7-x86_64.egg/numpy/core/include/
+set -e
+set -x
+
+export CFLAGS="-I/Users/piem/Library/Python/2.7/site-packages/numpy-1.8.0.dev_436a28f_20120710-py2.7-macosx-10.7-x86_64.egg/numpy/core/include/ -arch i386 -arch x86_64"
export LDFLAGS=-L../../build/src/
python setup.py clean build
export PYTHONPATH=./build/lib.macosx-10.6-intel-2.7:$PYTHONPATH
--- a/wscript
+++ b/wscript
@@ -52,7 +52,6 @@
ctx.add_option('--with-target-platform', type='string',
help='set target platform for cross-compilation', dest='target_platform')
ctx.load('compiler_c')
- ctx.load('compiler_cxx')
ctx.load('gnu_dirs')
ctx.load('waf_unit_test')
@@ -59,9 +58,7 @@
def configure(ctx):
import Options
ctx.check_tool('compiler_c')
- ctx.check_tool('compiler_cxx')
ctx.check_tool('gnu_dirs') # helpful for autotools transition and .pc generation
- #ctx.check_tool('misc') # needed for subst
ctx.load('waf_unit_test')
ctx.env.CFLAGS = ['-g']
@@ -70,6 +67,12 @@
if Options.platform == 'win32':
ctx.env['shlib_PATTERN'] = 'lib%s.dll'
+
+ if Options.platform == 'macfat':
+ ctx.env.CFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
+ ctx.env.LINKFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
+ ctx.env.CC = 'llvm-gcc-4.2'
+ ctx.env.LINK_CC = 'llvm-gcc-4.2'
# check for required headers
ctx.check(header_name='stdlib.h')