Changeset 4cb48d2 for python/lib


Ignore:
Timestamp:
Mar 23, 2017, 8:43:47 PM (7 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, sampler
Children:
6448d31
Parents:
da1a83f
Message:

python/lib/moresetuptools.py: remove unused variables, factorize macros

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/moresetuptools.py

    rda1a83f r4cb48d2  
    9494    ext.libraries += ['aubio']
    9595
    96 def add_local_aubio_sources(ext, usedouble = False):
     96def add_local_aubio_sources(ext):
    9797    """ build aubio inside python module instead of linking against libaubio """
    9898    print("Info: libaubio was not installed or built locally with waf, adding src/")
     
    102102
    103103def add_local_macros(ext, usedouble = False):
     104    if usedouble:
     105        ext.define_macros += [('HAVE_AUBIO_DOUBLE', 1)]
    104106    # define macros (waf puts them in build/src/config.h)
    105107    for define_macro in ['HAVE_STDLIB_H', 'HAVE_STDIO_H',
     
    194196    def build_extension(self, extension):
    195197        if self.enable_double or 'HAVE_AUBIO_DOUBLE' in os.environ:
    196             extension.define_macros += [('HAVE_AUBIO_DOUBLE', 1)]
    197198            enable_double = True
    198199        else:
     
    205206            if os.path.isfile(os.path.join('src', 'aubio.h')):
    206207                add_local_aubio_header(extension)
    207             add_local_macros(extension)
     208            add_local_macros(extension, usedouble=enable_double)
    208209            # look for a local waf build
    209210            if os.path.isfile(os.path.join('build','src', 'fvec.c.1.o')):
     
    213214                add_external_deps(extension, usedouble=enable_double)
    214215                # add libaubio sources and look for optional deps with pkg-config
    215                 add_local_aubio_sources(extension, usedouble=enable_double)
     216                add_local_aubio_sources(extension)
    216217        # generate files python/gen/*.c, python/gen/aubio-generated.h
    217218        extension.sources += generate_external(header, output_path, overwrite = False,
Note: See TracChangeset for help on using the changeset viewer.