Changeset 3d14829


Ignore:
Timestamp:
Dec 2, 2016, 1:03:41 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, yinfft+
Children:
473ab11
Parents:
bee6e96
Message:

python/lib/moresetuptools.py: also check for HAVE_AUBIO_DOUBLE

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • .travis.yml

    rbee6e96 r3d14829  
    3030      os: linux
    3131      compiler: gcc
    32       env: ARCH=x86_64 HAVE_DOUBLE=1 WAFOPTS=--enable-fftw3
     32      env: ARCH=x86_64 HAVE_AUBIO_DOUBLE=1 WAFOPTS=--enable-fftw3
    3333    - python: 2.7
    3434      os: linux
    3535      compiler: gcc
    36       env: ARCH=i386 HAVE_DOUBLE=1
     36      env: ARCH=i386 HAVE_AUBIO_DOUBLE=1
    3737    - python: 3.4
    3838      os: linux
    3939      compiler: gcc
    40       env: ARCH=x86_64 HAVE_DOUBLE=1
     40      env: ARCH=x86_64 HAVE_AUBIO_DOUBLE=1
    4141    - python: 3.4
    4242      os: linux
    4343      compiler: gcc
    44       env: ARCH=i386 HAVE_DOUBLE=1
     44      env: ARCH=i386 HAVE_AUBIO_DOUBLE=1
    4545    - language: C
    4646      os: osx
  • Makefile

    rbee6e96 r3d14829  
    99# multiple jobs
    1010WAFOPTS += --jobs 4
     11# if HAVE_AUBIO_DOUBLE is defined, pass --enable-double to waf
     12# python/lib/moresetuptools.py also checks for HAVE_AUBIO_DOUBLE
     13WAFOPTS += $(shell [ -z $(HAVE_AUBIO_DOUBLE) ] || echo --enable-double )
    1114
    1215DESTDIR:=$(PWD)/build/dist
     
    2326SOX=sox
    2427
    25 ENABLE_DOUBLE := $(shell [ -z $(HAVE_DOUBLE) ] || echo --enable-double )
    2628TESTSOUNDS := python/tests/sounds
    2729
     
    4547
    4648configure: checkwaf
    47         $(WAFCMD) configure $(WAFOPTS) $(ENABLE_DOUBLE)
     49        $(WAFCMD) configure $(WAFOPTS)
    4850
    4951build: configure
     
    8284build_python:
    8385        # build python-aubio, using locally built libaubio if found
    84         python ./setup.py build_ext $(ENABLE_DOUBLE)
     86        python ./setup.py build
    8587
    8688build_python_extlib:
     
    163165
    164166distcheck: checkwaf
    165         $(WAFCMD) distcheck $(WAFOPTS) $(ENABLE_DOUBLE)
     167        $(WAFCMD) distcheck $(WAFOPTS)
    166168
    167169help:
  • python/lib/gen_external.py

    rbee6e96 r3d14829  
    7676    return cpp_cmd
    7777
    78 def get_cpp_objects(header=header):
     78def get_cpp_objects(header=header, usedouble=False):
    7979    cpp_cmd = get_preprocessor()
    8080
    8181    macros = [('AUBIO_UNSTABLE', 1)]
     82    if usedouble:
     83        macros += [('HAVE_AUBIO_DOUBLE', 1)]
    8284
    8385    if not os.path.isfile(header):
     
    177179    elif not overwrite: return sorted(glob.glob(os.path.join(output_path, '*.c')))
    178180
    179     cpp_output, cpp_objects = get_cpp_objects(header)
     181    cpp_output, cpp_objects = get_cpp_objects(header, usedouble=usedouble)
    180182
    181183    lib = analyze_cpp_output(cpp_objects, cpp_output)
  • python/lib/moresetuptools.py

    rbee6e96 r3d14829  
    152152
    153153    def build_extension(self, extension):
    154         if self.enable_double:
     154        if self.enable_double or 'HAVE_AUBIO_DOUBLE' in os.environ:
    155155            extension.define_macros += [('HAVE_AUBIO_DOUBLE', 1)]
     156            enable_double = True
     157        else:
     158            enable_double = False
    156159        # seack for aubio headers and lib in PKG_CONFIG_PATH
    157160        add_system_aubio(extension)
     
    167170            else:
    168171                # check for external dependencies
    169                 add_external_deps(extension, usedouble=self.enable_double)
     172                add_external_deps(extension, usedouble=enable_double)
    170173                # add libaubio sources and look for optional deps with pkg-config
    171                 add_local_aubio_sources(extension, usedouble=self.enable_double)
     174                add_local_aubio_sources(extension, usedouble=enable_double)
    172175        # generate files python/gen/*.c, python/gen/aubio-generated.h
    173176        extension.sources += generate_external(header, output_path, overwrite = False,
    174                 usedouble=self.enable_double)
     177                usedouble=enable_double)
    175178        return _build_ext.build_extension(self, extension)
Note: See TracChangeset for help on using the changeset viewer.