Changeset c7155e9


Ignore:
Timestamp:
Sep 26, 2018, 3:03:11 PM (6 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
Children:
93bcc45, f761f06
Parents:
12a1115 (diff), d214124 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'feature/travispy37'

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • .appveyor.yml

    r12a1115 rc7155e9  
    44environment:
    55
     6  global:
     7      CUSTOM64PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
     8
    69  matrix:
    710
    811    # pre-installed python version, see:
    912    # http://www.appveyor.com/docs/installed-software#python
    10     - PYTHONDIR: "C:\\Python27"
    11       PYTHON_VERSION: "2.7.x"
    12       PYTHON_ARCH: "32"
     13    - PYTHONDIR: C:\Python27
     14      PYTHON_VERSION: 2.7.x
     15      PYTHON_ARCH: 32
    1316
    14     - PYTHONDIR: "C:\\Python27-x64"
    15       PYTHON_VERSION: "2.7.x"
    16       PYTHON_ARCH: "64"
     17    - PYTHONDIR: C:\Python27-x64
     18      PYTHON_VERSION: 2.7.x
     19      PYTHON_ARCH: 64
    1720
    18     - PYTHONDIR: "C:\\Python34"
    19       PYTHON_VERSION: "3.4.x"
    20       PYTHON_ARCH: "32"
     21    - PYTHONDIR: C:\Python35
     22      PYTHON_VERSION: 3.5.x
     23      PYTHON_ARCH: 32
    2124
    22     - PYTHONDIR: "C:\\Python34-x64"
    23       PYTHON_VERSION: "3.4.x"
    24       PYTHON_ARCH: "64"
     25    - PYTHONDIR: C:\Python35-x64
     26      PYTHON_VERSION: 3.5.x
     27      PYTHON_ARCH: 64
    2528
    26     - PYTHONDIR: "C:\\Python35"
    27       PYTHON_VERSION: "3.5.x"
    28       PYTHON_ARCH: "32"
     29    - PYTHONDIR: C:\Python36
     30      PYTHON_VERSION: 3.6.x
     31      PYTHON_ARCH: 32
    2932
    30     - PYTHONDIR: "C:\\Python35-x64"
    31       PYTHON_VERSION: "3.5.x"
    32       PYTHON_ARCH: "64"
    33       # add path required to run preprocessor step
    34       PATH_EXTRAS: "c:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin"
     33    - PYTHONDIR: C:\Python36-x64
     34      PYTHON_VERSION: 3.6.x
     35      PYTHON_ARCH: 64
     36
     37    - PYTHONDIR: C:\Python37
     38      PYTHON_VERSION: 3.7.x
     39      PYTHON_ARCH: 32
     40
     41    - PYTHONDIR: C:\Python37-x64
     42      PYTHON_VERSION: 3.7.x
     43      PYTHON_ARCH: 64
    3544
    3645install:
     
    3948  - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
    4049
     50  - "SET PATH=%PYTHONDIR%;%PYTHONDIR%\\Scripts;%PATH%"
     51
     52  - if [%PYTHON_ARCH%]==[64] SET PATH=%CUSTOM64PATH%;%PATH%
     53
    4154  # Check that we have the expected version and architecture for Python
    42   - "%PYTHONDIR%\\python.exe --version"
    43   - "%PYTHONDIR%\\python.exe -c \"import struct; print(struct.calcsize('P') * 8)\""
     55  - "python --version"
     56  - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
    4457
    45   - "%PYTHONDIR%\\python.exe -m pip install --disable-pip-version-check --user --upgrade pip"
    46   - "%PYTHONDIR%\\python.exe -m pip install --upgrade setuptools"
     58  - "python -m pip install --disable-pip-version-check --user --upgrade pip"
     59  - "python -m pip install --upgrade setuptools"
    4760
    4861  # We need wheel installed to build wheels
    49   - "%PYTHONDIR%\\python.exe -m pip install wheel"
     62  - "python -m pip install wheel"
    5063
    51   - "SET PATH=%PATH_EXTRAS%;%PYTHONDIR%;%PYTHONDIR%\\Scripts;%PATH%"
     64  - "pip install -r requirements.txt"
    5265
    5366before_build:
     
    5568
    5669build_script:
     70  # also build libaubio with waf
     71  - python waf configure build install --verbose --msvc_version="msvc 14.0"
     72  # clean before building python package
     73  - python waf distclean
    5774  # build python module without using libaubio
    58   - "%PYTHONDIR%\\python.exe -m pip install -r requirements.txt"
    59   - "python setup.py build"
    60   - "%PYTHONDIR%\\python.exe -m pip install ."
     75  - pip wheel -v -v -v --wheel-dir=dist .
     76  # build, upload and install wheel (inspired by numpy's appveyor)
     77  - ps: |
     78      pip wheel -v -v -v --wheel-dir=dist .
     79      ls dist -r | Foreach-Object {
     80          Push-AppveyorArtifact $_.FullName
     81          pip install $_.FullName
     82      }
     83
     84test_script:
    6185  - "python python\\demos\\demo_create_test_sounds.py"
    6286  - "nose2 --verbose"
    63   # clean up
    64   - "python waf distclean"
    65   # build libaubio
    66   - python waf configure build --verbose --msvc_version="msvc 14.0"
  • .gitignore

    r12a1115 rc7155e9  
    4444aubio-*.zip
    4545dist/*.tar.gz
     46dist/*.whl
    4647
    4748# test sounds
  • python/lib/gen_external.py

    r12a1115 rc7155e9  
    8686    ''' return a dense and preprocessed  string of all c declarations implied by aubio.h
    8787    '''
     88    cpp_output = get_cpp_output(header=header, usedouble=usedouble)
     89    return filter_cpp_output (cpp_output)
     90
     91
     92def get_cpp_output(header=header, usedouble=False):
     93    ''' find and run a C pre-processor on aubio.h '''
    8894    cpp_cmd = get_preprocessor()
    8995
     
    106112    cpp_output = proc.stdout.read()
    107113    err_output = proc.stderr.read()
     114    if err_output:
     115        print("Warning: preprocessor produced errors or warnings:\n%s" \
     116                % err_output.decode('utf8'))
    108117    if not cpp_output:
    109         raise Exception("preprocessor output is empty:\n%s" % err_output)
    110     elif err_output:
    111         print("Warning: preprocessor produced warnings:\n%s" % err_output)
     118        raise_msg = "preprocessor output is empty! Running command " \
     119                + "\"%s\" failed" % " ".join(cpp_cmd)
     120        if err_output:
     121            raise_msg += " with stderr: \"%s\"" % err_output.decode('utf8')
     122        else:
     123            raise_msg += " with no stdout or stderr"
     124        raise Exception(raise_msg)
    112125    if not isinstance(cpp_output, list):
    113126        cpp_output = [l.strip() for l in cpp_output.decode('utf8').split('\n')]
    114127
    115     cpp_output = filter(lambda y: len(y) > 1, cpp_output)
     128    return cpp_output
     129
     130def filter_cpp_output(cpp_raw_output):
     131    ''' prepare cpp-output for parsing '''
     132    cpp_output = filter(lambda y: len(y) > 1, cpp_raw_output)
    116133    cpp_output = list(filter(lambda y: not y.startswith('#'), cpp_output))
    117134
Note: See TracChangeset for help on using the changeset viewer.