shithub: aubio

Download patch

ref: c23d45f4daaa4c32e6a6c38e83fdfae83a3613c7
parent: f77820df62716ea1c5edb481673247ec26e0401b
author: Martin Hermant <martin.hermant@gmail.com>
date: Mon Mar 13 19:11:14 EDT 2017

fix non conform Indentations

--- a/this_version.py
+++ b/this_version.py
@@ -10,41 +10,41 @@
 
     global __version_info
     if not __version_info:
-      this_file_dir = os.path.dirname(os.path.abspath(__file__))
-      version_file = os.path.join(this_file_dir,  'VERSION')
+        this_file_dir = os.path.dirname(os.path.abspath(__file__))
+        version_file = os.path.join(this_file_dir,  'VERSION')
 
-      if not os.path.isfile(version_file):
-          raise SystemError("VERSION file not found.")
+        if not os.path.isfile(version_file):
+            raise SystemError("VERSION file not found.")
 
 
-      for l in open(version_file).readlines():
-        #exec (l.strip())
-        if l.startswith('AUBIO_MAJOR_VERSION'):
-            __version_info['AUBIO_MAJOR_VERSION'] = int(l.split('=')[1])
-        if l.startswith('AUBIO_MINOR_VERSION'):
-            __version_info['AUBIO_MINOR_VERSION'] = int(l.split('=')[1])
-        if l.startswith('AUBIO_PATCH_VERSION'):
-            __version_info['AUBIO_PATCH_VERSION'] = int(l.split('=')[1])
-        if l.startswith('AUBIO_VERSION_STATUS'):
-            __version_info['AUBIO_VERSION_STATUS'] = l.split('=')[1].strip()[1:-1]
+        for l in open(version_file).readlines():
+          #exec (l.strip())
+          if l.startswith('AUBIO_MAJOR_VERSION'):
+              __version_info['AUBIO_MAJOR_VERSION'] = int(l.split('=')[1])
+          if l.startswith('AUBIO_MINOR_VERSION'):
+              __version_info['AUBIO_MINOR_VERSION'] = int(l.split('=')[1])
+          if l.startswith('AUBIO_PATCH_VERSION'):
+              __version_info['AUBIO_PATCH_VERSION'] = int(l.split('=')[1])
+          if l.startswith('AUBIO_VERSION_STATUS'):
+              __version_info['AUBIO_VERSION_STATUS'] = l.split('=')[1].strip()[1:-1]
 
-        if l.startswith('LIBAUBIO_LT_CUR'):
-          __version_info['LIBAUBIO_LT_CUR'] = int(l.split('=')[1])
-        if l.startswith('LIBAUBIO_LT_REV'):
-          __version_info['LIBAUBIO_LT_REV'] = int(l.split('=')[1])
-        if l.startswith('LIBAUBIO_LT_AGE'):
-          __version_info['LIBAUBIO_LT_AGE'] = int(l.split('=')[1])
+          if l.startswith('LIBAUBIO_LT_CUR'):
+            __version_info['LIBAUBIO_LT_CUR'] = int(l.split('=')[1])
+          if l.startswith('LIBAUBIO_LT_REV'):
+            __version_info['LIBAUBIO_LT_REV'] = int(l.split('=')[1])
+          if l.startswith('LIBAUBIO_LT_AGE'):
+            __version_info['LIBAUBIO_LT_AGE'] = int(l.split('=')[1])
 
-      if len(__version_info) <6:
-          raise SystemError("Failed parsing VERSION file.")
+        if len(__version_info) <6:
+            raise SystemError("Failed parsing VERSION file.")
 
 
-      # switch version status with commit sha in alpha releases
-      if __version_info['AUBIO_VERSION_STATUS'] and \
-      '~alpha' in __version_info['AUBIO_VERSION_STATUS'] :
-          AUBIO_GIT_SHA = get_git_revision_hash()
-          if AUBIO_GIT_SHA:
-            __version_info['AUBIO_VERSION_STATUS'] = '~git'+AUBIO_GIT_SHA
+        # switch version status with commit sha in alpha releases
+        if __version_info['AUBIO_VERSION_STATUS'] and \
+        '~alpha' in __version_info['AUBIO_VERSION_STATUS'] :
+            AUBIO_GIT_SHA = get_git_revision_hash()
+            if AUBIO_GIT_SHA:
+              __version_info['AUBIO_VERSION_STATUS'] = '~git'+AUBIO_GIT_SHA
 
     return __version_info
 
@@ -76,11 +76,11 @@
     verstr = '%s.%s.%s'%get_aubio_version_tuple()
     if add_status and vdict['AUBIO_VERSION_STATUS'] :
       if '~git' in vdict['AUBIO_VERSION_STATUS']:
-        verstr += "+a0."+vdict['AUBIO_VERSION_STATUS'][1:]
+          verstr += "+a0."+vdict['AUBIO_VERSION_STATUS'][1:]
       elif '~alpha':
-        verstr += "+a0"
+          verstr += "+a0"
       else:
-        raise SystemError("Aubio version statut not supported : %s"%vdict['AUBIO_VERSION_STATUS'])
+          raise SystemError("Aubio version statut not supported : %s"%vdict['AUBIO_VERSION_STATUS'])
     return verstr
 
 
@@ -97,13 +97,13 @@
         raise SystemError("git / root folder not found")
     gitcmd = ['git','-C',aubio_dir ,'rev-parse']
     if short:
-      gitcmd.append('--short')
+        gitcmd.append('--short')
     gitcmd.append('HEAD')
     try:
-      outCmd = subprocess.check_output(gitcmd).strip().decode('utf8')
+        outCmd = subprocess.check_output(gitcmd).strip().decode('utf8')
     except Exception as e:
-      print ('git command error :%s'%e)
-      return None
+        print ('git command error :%s'%e)
+        return None
     return outCmd