Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    ra4afbac r622b6dc  
    4343            choices = ('debug', 'release'),
    4444            dest = 'build_type',
    45             help = 'whether to compile with (--build-type=release)' \
    46                     ' or without (--build-type=debug)' \
    47                     ' compiler opimizations [default: release]')
     45            help = 'whether to compile with (--build-type=release) or without (--build-type=debug) '\
     46              ' compiler opimizations [default: release]')
    4847    add_option_enable_disable(ctx, 'fftw3f', default = False,
    4948            help_str = 'compile with fftw3f instead of ooura (recommended)',
     
    111110
    112111    ctx.add_option('--with-target-platform', type='string',
    113             help='set target platform for cross-compilation',
    114             dest='target_platform')
     112            help='set target platform for cross-compilation', dest='target_platform')
    115113
    116114    ctx.load('compiler_c')
     
    208206            ctx.msg('Checking for AudioToolbox.framework', 'yes')
    209207        else:
    210             ctx.msg('Checking for AudioToolbox.framework', 'no (disabled)',
    211                     color = 'YELLOW')
     208            ctx.msg('Checking for AudioToolbox.framework', 'no (disabled)', color = 'YELLOW')
    212209        if (ctx.options.enable_accelerate != False):
    213210            ctx.define('HAVE_ACCELERATE', 1)
     
    215212            ctx.msg('Checking for Accelerate framework', 'yes')
    216213        else:
    217             ctx.msg('Checking for Accelerate framework', 'no (disabled)',
    218                     color = 'YELLOW')
     214            ctx.msg('Checking for Accelerate framework', 'no (disabled)', color = 'YELLOW')
    219215
    220216    if target_platform in [ 'ios', 'iosimulator' ]:
     
    270266        # tell emscripten functions we want to expose
    271267        from python.lib.gen_external import get_c_declarations, \
    272                 get_cpp_objects_from_c_declarations, \
    273                 get_all_func_names_from_lib, \
     268                get_cpp_objects_from_c_declarations, get_all_func_names_from_lib, \
    274269                generate_lib_from_c_declarations
    275         # emscripten can't use double
    276         c_decls = get_c_declarations(usedouble=False)
     270        c_decls = get_c_declarations(usedouble=False)  # emscripten can't use double
    277271        objects = list(get_cpp_objects_from_c_declarations(c_decls))
    278272        # ensure that aubio structs are exported
     
    281275        exported_funcnames = get_all_func_names_from_lib(lib)
    282276        c_mangled_names = ['_' + s for s in exported_funcnames]
    283         ctx.env.LINKFLAGS_cshlib += ['-s',
    284                 'EXPORTED_FUNCTIONS=%s' % c_mangled_names]
     277        ctx.env.LINKFLAGS_cshlib += ['-s', 'EXPORTED_FUNCTIONS=%s' % c_mangled_names]
    285278
    286279    # check support for C99 __VA_ARGS__ macros
     
    312305    # check for Intel IPP
    313306    if (ctx.options.enable_intelipp != False):
    314         has_ipp_headers = ctx.check(header_name=['ippcore.h', 'ippvm.h',
    315             'ipps.h'], mandatory = False)
     307        has_ipp_headers = ctx.check(header_name=['ippcore.h', 'ippvm.h', 'ipps.h'],
     308                mandatory = False)
    316309        has_ipp_libs = ctx.check(lib=['ippcore', 'ippvm', 'ipps'],
    317310                uselib_store='INTEL_IPP', mandatory = False)
     
    320313            ctx.define('HAVE_INTEL_IPP', 1)
    321314            if ctx.env.CC_NAME == 'msvc':
    322                 # force linking multi-threaded static IPP libraries on Windows
    323                 # with msvc
     315                # force linking multi-threaded static IPP libraries on Windows with msvc
    324316                ctx.define('_IPP_SEQUENTIAL_STATIC', 1)
    325317        else:
     
    370362    if (ctx.options.enable_double):
    371363        if (ctx.options.enable_samplerate):
    372             ctx.fatal("Could not compile aubio in double precision mode' \
    373                     ' with libsamplerate")
     364            ctx.fatal("Could not compile aubio in double precision mode with libsamplerate")
    374365        else:
    375366            ctx.options.enable_samplerate = False
    376             ctx.msg('Checking if using samplerate',
    377                     'no (disabled in double precision mode)', color = 'YELLOW')
     367            ctx.msg('Checking if using samplerate', 'no (disabled in double precision mode)',
     368                    color = 'YELLOW')
    378369    if (ctx.options.enable_samplerate != False):
    379370        ctx.check_cfg(package = 'samplerate',
     
    418409        elif 'HAVE_AVUTIL' not in ctx.env:
    419410            ctx.msg(msg_check, 'not found (missing avutil)', color = 'YELLOW')
    420         elif 'HAVE_SWRESAMPLE' not in ctx.env \
    421                 and 'HAVE_AVRESAMPLE' not in ctx.env:
     411        elif 'HAVE_SWRESAMPLE' not in ctx.env and 'HAVE_AVRESAMPLE' not in ctx.env:
    422412            resample_missing = 'not found (avresample or swresample required)'
    423413            ctx.msg(msg_check, resample_missing, color = 'YELLOW')
     
    432422    if (ctx.options.enable_wavread != False):
    433423        ctx.define('HAVE_WAVREAD', 1)
    434     ctx.msg('Checking if using source_wavread',
    435             ctx.options.enable_wavread and 'yes' or 'no')
     424    ctx.msg('Checking if using source_wavread', ctx.options.enable_wavread and 'yes' or 'no')
    436425    if (ctx.options.enable_wavwrite!= False):
    437426        ctx.define('HAVE_WAVWRITE', 1)
    438     ctx.msg('Checking if using sink_wavwrite',
    439             ctx.options.enable_wavwrite and 'yes' or 'no')
     427    ctx.msg('Checking if using sink_wavwrite', ctx.options.enable_wavwrite and 'yes' or 'no')
    440428
    441429    # use BLAS/ATLAS
     
    555543
    556544def sphinx(bld):
    557     # build documentation from source files using sphinx-build note: build in
    558     # ../doc/_build/html, otherwise waf wont install unsigned files
     545    # build documentation from source files using sphinx-build
     546    # note: build in ../doc/_build/html, otherwise waf wont install unsigned files
    559547    if bld.env['SPHINX']:
    560548        bld.env.VERSION = VERSION
    561549        bld( name = 'sphinx',
    562                 rule = '${SPHINX} -b html -D release=${VERSION}' \
    563                         ' -D version=${VERSION} -a -q' \
    564                         ' `dirname ${SRC}` `dirname ${TGT}`',
     550                rule = '${SPHINX} -b html -D release=${VERSION} -D version=${VERSION} -a -q `dirname ${SRC}` `dirname ${TGT}`',
    565551                source = 'doc/conf.py',
    566552                target = '../doc/_build/html/index.html')
     
    592578    from waflib import Logs
    593579    if bld.options.target_platform in ['ios', 'iosimulator']:
    594         msg ='building for %s, contact the author for a commercial license' \
    595                 % bld.options.target_platform
     580        msg ='building for %s, contact the author for a commercial license' % bld.options.target_platform
    596581        Logs.pprint('RED', msg)
    597582        msg ='   Paul Brossier <piem@aubio.org>'
     
    599584
    600585def dist(ctx):
    601     ctx.excl  = ' **/.waf*'
    602     ctx.excl += ' **/.git*'
    603     ctx.excl += ' **/*~ **/*.pyc **/*.swp **/*.swo **/*.swn **/.lock-w*'
     586    ctx.excl  = ' **/.waf* **/*~ **/*.pyc **/*.swp **/*.swo **/*.swn **/.lock-w* **/.git*'
    604587    ctx.excl += ' **/build/*'
    605588    ctx.excl += ' doc/_build'
     
    609592    ctx.excl += ' **/python/lib/aubio/_aubio.so'
    610593    ctx.excl += ' **.egg-info'
    611     ctx.excl += ' **/.eggs'
    612     ctx.excl += ' **/.pytest_cache'
    613     ctx.excl += ' **/.cache'
    614594    ctx.excl += ' **/**.zip **/**.tar.bz2'
    615595    ctx.excl += ' **.tar.bz2'
Note: See TracChangeset for help on using the changeset viewer.