Changes in / [115b452:cc4987a]


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • python/lib/moresetuptools.py

    r115b452 rcc4987a  
    5656    ext.libraries += ['aubio']
    5757
    58 def add_local_aubio_sources(ext, usedouble = False):
     58def add_local_aubio_sources(ext):
    5959    """ build aubio inside python module instead of linking against libaubio """
    6060    print("Info: libaubio was not installed or built locally with waf, adding src/")
     
    6464
    6565def add_local_macros(ext, usedouble = False):
     66    if usedouble:
     67        ext.define_macros += [('HAVE_AUBIO_DOUBLE', 1)]
    6668    # define macros (waf puts them in build/src/config.h)
    6769    for define_macro in ['HAVE_STDLIB_H', 'HAVE_STDIO_H',
     
    156158    def build_extension(self, extension):
    157159        if self.enable_double or 'HAVE_AUBIO_DOUBLE' in os.environ:
    158             extension.define_macros += [('HAVE_AUBIO_DOUBLE', 1)]
    159160            enable_double = True
    160161        else:
     
    167168            if os.path.isfile(os.path.join('src', 'aubio.h')):
    168169                add_local_aubio_header(extension)
    169             add_local_macros(extension)
     170            add_local_macros(extension, usedouble=enable_double)
    170171            # look for a local waf build
    171172            if os.path.isfile(os.path.join('build','src', 'fvec.c.1.o')):
     
    175176                add_external_deps(extension, usedouble=enable_double)
    176177                # add libaubio sources and look for optional deps with pkg-config
    177                 add_local_aubio_sources(extension, usedouble=enable_double)
     178                add_local_aubio_sources(extension)
    178179        # generate files python/gen/*.c, python/gen/aubio-generated.h
    179180        extension.include_dirs += [ output_path ]
  • python/tests/test_sink.py

    r115b452 rcc4987a  
    118118
    119119    def test_read_with(self):
    120         sink_path =get_tmp_sink_path()
     120        samplerate = 44100
     121        sink_path = get_tmp_sink_path()
    121122        vec = fvec(128)
    122123        with sink(sink_path, samplerate) as g:
    123             for i in range(10):
     124            for _ in range(10):
    124125                g(vec, 128)
    125126
  • python/tests/test_source.py

    r115b452 rcc4987a  
    66from aubio import source
    77from .utils import list_all_sounds
    8 import numpy as np
    98
    109import warnings
  • wscript

    r115b452 rcc4987a  
    251251        # one of fftwf or fftw3f
    252252        if (ctx.options.enable_fftw3f != False):
    253             ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
    254                     args = '--cflags --libs',
     253            ctx.check_cfg(package = 'fftw3f',
     254                    args = '--cflags --libs fftw3f >= 3.0.0',
    255255                    mandatory = ctx.options.enable_fftw3f)
    256256            if (ctx.options.enable_double == True):
     
    261261            # enable_double
    262262            if (ctx.options.enable_double == True):
    263                 ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
    264                         args = '--cflags --libs', mandatory =
    265                         ctx.options.enable_fftw3)
     263                ctx.check_cfg(package = 'fftw3',
     264                        args = '--cflags --libs fftw3 >= 3.0.0.',
     265                        mandatory = ctx.options.enable_fftw3)
    266266            else:
    267                 ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
    268                         args = '--cflags --libs',
     267                ctx.check_cfg(package = 'fftw3f',
     268                        args = '--cflags --libs fftw3f >= 3.0.0',
    269269                        mandatory = ctx.options.enable_fftw3)
    270270        ctx.define('HAVE_FFTW3', 1)
     
    282282    # check for libsndfile
    283283    if (ctx.options.enable_sndfile != False):
    284         ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4',
    285                 args = '--cflags --libs',
     284        ctx.check_cfg(package = 'sndfile',
     285                args = '--cflags --libs sndfile >= 1.0.4',
    286286                mandatory = ctx.options.enable_sndfile)
    287287
     
    295295                    color = 'YELLOW')
    296296    if (ctx.options.enable_samplerate != False):
    297         ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15',
    298                 args = '--cflags --libs',
     297        ctx.check_cfg(package = 'samplerate',
     298                args = '--cflags --libs samplerate >= 0.0.15',
    299299                mandatory = ctx.options.enable_samplerate)
    300300
     
    307307    # check for libav
    308308    if (ctx.options.enable_avcodec != False):
    309         ctx.check_cfg(package = 'libavcodec', atleast_version = '54.35.0',
    310                 args = '--cflags --libs', uselib_store = 'AVCODEC',
     309        ctx.check_cfg(package = 'libavcodec',
     310                args = '--cflags --libs libavcodec >= 54.35.0',
     311                uselib_store = 'AVCODEC',
    311312                mandatory = ctx.options.enable_avcodec)
    312         ctx.check_cfg(package = 'libavformat', atleast_version = '52.3.0',
    313                 args = '--cflags --libs', uselib_store = 'AVFORMAT',
     313        ctx.check_cfg(package = 'libavformat',
     314                args = '--cflags --libs libavformat >= 52.3.0',
     315                uselib_store = 'AVFORMAT',
    314316                mandatory = ctx.options.enable_avcodec)
    315         ctx.check_cfg(package = 'libavutil', atleast_version = '52.3.0',
    316                 args = '--cflags --libs', uselib_store = 'AVUTIL',
     317        ctx.check_cfg(package = 'libavutil',
     318                args = '--cflags --libs libavutil >= 52.3.0',
     319                uselib_store = 'AVUTIL',
    317320                mandatory = ctx.options.enable_avcodec)
    318         ctx.check_cfg(package = 'libswresample', atleast_version = '2.3.0',
    319                 args = '--cflags --libs', uselib_store = 'SWRESAMPLE',
     321        ctx.check_cfg(package = 'libswresample',
     322                args = '--cflags --libs libswresample >= 2.3.0',
     323                uselib_store = 'SWRESAMPLE',
    320324                mandatory = False)
    321325        if 'HAVE_SWRESAMPLE' not in ctx.env:
    322             ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1',
    323                     args = '--cflags --libs', uselib_store = 'AVRESAMPLE',
     326            ctx.check_cfg(package = 'libavresample',
     327                    args = '--cflags --libs libavresample >= 1.0.1',
     328                    uselib_store = 'AVRESAMPLE',
    324329                    mandatory = False)
    325330
Note: See TracChangeset for help on using the changeset viewer.