Changeset 41399bd


Ignore:
Timestamp:
Mar 5, 2013, 8:10:57 PM (12 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:
4d3b573
Parents:
63f6c13
Message:

ext/aubio-types.h: use -DLOCAL_AUBIO to build against local aubio

Location:
python
Files:
2 edited

Legend:

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

    r63f6c13 r41399bd  
    2323
    2424#define AUBIO_UNSTABLE 1
     25#ifdef LOCAL_AUBIO
    2526#include "aubio.h"
     27#else
     28#include "aubio/aubio.h"
     29#endif
    2630
    2731#define Py_default_vector_length 1024
  • python/setup.py

    r63f6c13 r41399bd  
    1212        + AUBIO_VERSION_STATUS
    1313
    14 library_dirs = ['../build/src']
    15 include_dirs = ['../src'] # aubio.h
    16 include_dirs += ['../build/src'] # config.h
     14include_dirs = []
     15library_dirs = []
     16define_macros = []
     17
    1718include_dirs += ['ext']
    18 include_dirs += ['gen']
    19 #include_dirs += ['../build/src', '../src', '.' ]
    20 
    21 library_dirs = filter (lambda x: os.path.isdir(x), library_dirs)
    22 include_dirs = filter (lambda x: os.path.isdir(x), include_dirs)
    23 
    24 generated_object_files = []
     19include_dirs += [ numpy.get_include() ]
    2520
    2621output_path = 'gen'
     22generated_object_files = []
    2723
    2824if not os.path.isdir(output_path):
    2925    from generator import generate_object_files
    3026    generated_object_files = generate_object_files(output_path)
     27    # define include dirs
    3128else:
    3229    import glob
    3330    generated_object_files = glob.glob(os.path.join(output_path, '*.c'))
     31include_dirs += [output_path]
     32
     33if os.path.isfile('../src/aubio.h'):
     34    define_macros += [('USE_LOCAL_AUBIO', 1)]
     35    include_dirs += ['../src'] # aubio.h
     36    include_dirs += ['../build/src'] # config.h
     37    library_dirs += ['../build/src']
    3438
    3539aubio_extension = Extension("aubio._aubio", [
     
    4650            # generated files
    4751            ] + generated_object_files,
    48         include_dirs = include_dirs + [ numpy.get_include() ],
     52        include_dirs = include_dirs,
    4953        library_dirs = library_dirs,
     54        define_macros = define_macros,
    5055        libraries=['aubio'])
    5156
Note: See TracChangeset for help on using the changeset viewer.