Ignore:
Timestamp:
Apr 10, 2017, 10:30:50 AM (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:
2610b66
Parents:
ede63e3
Message:

python/lib/moresetuptools.py: force adding libav on window (see conda-forge/pkg-config-feedstock#11)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/moresetuptools.py

    rede63e3 r67a3053  
    117117    ext.define_macros += [('HAVE_WAVWRITE', 1)]
    118118    ext.define_macros += [('HAVE_WAVREAD', 1)]
    119     # TODO:
    120     # add cblas
     119
     120    # TODO: add cblas
    121121    if 0:
    122122        ext.libraries += ['cblas']
     
    131131    else:
    132132        print("Info: using system aubio " + aubio_version + " found in " + ' '.join(ext.library_dirs))
     133
     134def add_libav_on_win(ext):
     135    """ no pkg-config on windows, simply assume these libs are available """
     136    ext.libraries += ['avformat', 'avutil', 'avcodec', 'swresample']
     137    for define_macro in ['HAVE_LIBAV', 'HAVE_SWRESAMPLE']:
     138        ext.define_macros += [(define_macro, 1)]
    133139
    134140class CleanGenerated(distutils.command.clean.clean):
     
    175181                # check for external dependencies
    176182                add_external_deps(extension, usedouble=enable_double)
     183                # force adding libav on windows
     184                if os.name == 'nt' and ('WITH_LIBAV' in os.environ \
     185                        or 'CONDA_PREFIX' in os.environ):
     186                    add_libav_on_win(extension)
    177187                # add libaubio sources and look for optional deps with pkg-config
    178188                add_local_aubio_sources(extension)
Note: See TracChangeset for help on using the changeset viewer.