Changeset ad5203c for python/ext


Ignore:
Timestamp:
Mar 5, 2013, 5:46:48 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
63f6c13
Parents:
208336b
Message:

python/: improve build

Location:
python/ext
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • python/ext/aubio-types.h

    r208336b rad5203c  
    1111#ifndef PY_AUBIO_MODULE_MAIN
    1212#define NO_IMPORT_ARRAY
     13#endif
     14#include <numpy/arrayobject.h>
     15#ifndef PY_AUBIO_MODULE_UFUNC
    1316#define NO_IMPORT_UFUNC
     17#else
     18#include <numpy/ufuncobject.h>
    1419#endif
    1520
    1621// import aubio
    17 #include <numpy/ndarraytypes.h>
    18 #include <numpy/ufuncobject.h>
    19 #include <numpy/npy_3kcompat.h>
     22//#include <numpy/npy_3kcompat.h>
    2023
    2124#define AUBIO_UNSTABLE 1
    22 #include <aubio.h>
     25#include "aubio.h"
    2326
    2427#define Py_default_vector_length 1024
  • python/ext/aubiomodule.c

    r208336b rad5203c  
    11#define PY_AUBIO_MODULE_MAIN
    22#include "aubio-types.h"
    3 #include "generated/aubio-generated.h"
     3#include "aubio-generated.h"
     4
     5extern void add_generated_objects ( PyObject *m );
     6extern void add_ufuncs ( PyObject *m );
    47
    58static char Py_alpha_norm_doc[] = "compute alpha normalisation factor";
     
    262265
    263266  err = _import_array ();
    264 
    265267  if (err != 0) {
    266268    fprintf (stderr,
    267         "Unable to import Numpy C API from aubio module (error %d)\n", err);
     269        "Unable to import Numpy array from aubio module (error %d)\n", err);
    268270  }
    269271
  • python/ext/ufuncs.c

    r208336b rad5203c  
     1#define PY_AUBIO_MODULE_UFUNC
    12#include "aubio-types.h"
    23
     
    6162void add_ufuncs ( PyObject *m )
    6263{
    63   int err = _import_umath();
     64  int err = 0;
    6465
     66  err = _import_umath ();
    6567  if (err != 0) {
    6668    fprintf (stderr,
    67             "Unable to import Numpy C API Ufunc from aubio module (error %d)\n", err);
     69        "Unable to import Numpy umath from aubio module (error %d)\n", err);
    6870  }
    6971
Note: See TracChangeset for help on using the changeset viewer.