Changeset c23d45f


Ignore:
Timestamp:
Mar 13, 2017, 11:11:14 PM (3 years ago)
Author:
Martin Hermant <martin.hermant@gmail.com>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler
Children:
07bfe2d2
Parents:
f77820d
Message:

fix non conform Indentations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • this_version.py

    rf77820d rc23d45f  
    1111    global __version_info
    1212    if not __version_info:
    13       this_file_dir = os.path.dirname(os.path.abspath(__file__))
    14       version_file = os.path.join(this_file_dir,  'VERSION')
     13        this_file_dir = os.path.dirname(os.path.abspath(__file__))
     14        version_file = os.path.join(this_file_dir,  'VERSION')
    1515
    16       if not os.path.isfile(version_file):
    17           raise SystemError("VERSION file not found.")
     16        if not os.path.isfile(version_file):
     17            raise SystemError("VERSION file not found.")
    1818
    1919
    20       for l in open(version_file).readlines():
    21         #exec (l.strip())
    22         if l.startswith('AUBIO_MAJOR_VERSION'):
    23             __version_info['AUBIO_MAJOR_VERSION'] = int(l.split('=')[1])
    24         if l.startswith('AUBIO_MINOR_VERSION'):
    25             __version_info['AUBIO_MINOR_VERSION'] = int(l.split('=')[1])
    26         if l.startswith('AUBIO_PATCH_VERSION'):
    27             __version_info['AUBIO_PATCH_VERSION'] = int(l.split('=')[1])
    28         if l.startswith('AUBIO_VERSION_STATUS'):
    29             __version_info['AUBIO_VERSION_STATUS'] = l.split('=')[1].strip()[1:-1]
     20        for l in open(version_file).readlines():
     21          #exec (l.strip())
     22          if l.startswith('AUBIO_MAJOR_VERSION'):
     23              __version_info['AUBIO_MAJOR_VERSION'] = int(l.split('=')[1])
     24          if l.startswith('AUBIO_MINOR_VERSION'):
     25              __version_info['AUBIO_MINOR_VERSION'] = int(l.split('=')[1])
     26          if l.startswith('AUBIO_PATCH_VERSION'):
     27              __version_info['AUBIO_PATCH_VERSION'] = int(l.split('=')[1])
     28          if l.startswith('AUBIO_VERSION_STATUS'):
     29              __version_info['AUBIO_VERSION_STATUS'] = l.split('=')[1].strip()[1:-1]
    3030
    31         if l.startswith('LIBAUBIO_LT_CUR'):
    32           __version_info['LIBAUBIO_LT_CUR'] = int(l.split('=')[1])
    33         if l.startswith('LIBAUBIO_LT_REV'):
    34           __version_info['LIBAUBIO_LT_REV'] = int(l.split('=')[1])
    35         if l.startswith('LIBAUBIO_LT_AGE'):
    36           __version_info['LIBAUBIO_LT_AGE'] = int(l.split('=')[1])
     31          if l.startswith('LIBAUBIO_LT_CUR'):
     32            __version_info['LIBAUBIO_LT_CUR'] = int(l.split('=')[1])
     33          if l.startswith('LIBAUBIO_LT_REV'):
     34            __version_info['LIBAUBIO_LT_REV'] = int(l.split('=')[1])
     35          if l.startswith('LIBAUBIO_LT_AGE'):
     36            __version_info['LIBAUBIO_LT_AGE'] = int(l.split('=')[1])
    3737
    38       if len(__version_info) <6:
    39           raise SystemError("Failed parsing VERSION file.")
     38        if len(__version_info) <6:
     39            raise SystemError("Failed parsing VERSION file.")
    4040
    4141
    42       # switch version status with commit sha in alpha releases
    43       if __version_info['AUBIO_VERSION_STATUS'] and \
    44       '~alpha' in __version_info['AUBIO_VERSION_STATUS'] :
    45           AUBIO_GIT_SHA = get_git_revision_hash()
    46           if AUBIO_GIT_SHA:
    47             __version_info['AUBIO_VERSION_STATUS'] = '~git'+AUBIO_GIT_SHA
     42        # switch version status with commit sha in alpha releases
     43        if __version_info['AUBIO_VERSION_STATUS'] and \
     44        '~alpha' in __version_info['AUBIO_VERSION_STATUS'] :
     45            AUBIO_GIT_SHA = get_git_revision_hash()
     46            if AUBIO_GIT_SHA:
     47              __version_info['AUBIO_VERSION_STATUS'] = '~git'+AUBIO_GIT_SHA
    4848
    4949    return __version_info
     
    7777    if add_status and vdict['AUBIO_VERSION_STATUS'] :
    7878      if '~git' in vdict['AUBIO_VERSION_STATUS']:
    79         verstr += "+a0."+vdict['AUBIO_VERSION_STATUS'][1:]
     79          verstr += "+a0."+vdict['AUBIO_VERSION_STATUS'][1:]
    8080      elif '~alpha':
    81         verstr += "+a0"
     81          verstr += "+a0"
    8282      else:
    83         raise SystemError("Aubio version statut not supported : %s"%vdict['AUBIO_VERSION_STATUS'])
     83          raise SystemError("Aubio version statut not supported : %s"%vdict['AUBIO_VERSION_STATUS'])
    8484    return verstr
    8585
     
    9898    gitcmd = ['git','-C',aubio_dir ,'rev-parse']
    9999    if short:
    100       gitcmd.append('--short')
     100        gitcmd.append('--short')
    101101    gitcmd.append('HEAD')
    102102    try:
    103       outCmd = subprocess.check_output(gitcmd).strip().decode('utf8')
     103        outCmd = subprocess.check_output(gitcmd).strip().decode('utf8')
    104104    except Exception as e:
    105       print ('git command error :%s'%e)
    106       return None
     105        print ('git command error :%s'%e)
     106        return None
    107107    return outCmd
    108108
Note: See TracChangeset for help on using the changeset viewer.