Changeset b201912 for this_version.py
- Timestamp:
- Apr 11, 2017, 1:49:44 AM (7 years ago)
- Branches:
- sampler
- Children:
- 04d0c89
- Parents:
- fbafd2c (diff), b762f8d (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
this_version.py
rfbafd2c rb201912 1 1 #! python 2 2 import os 3 import sys 3 4 4 5 __version_info = {} # keep a reference to parse VERSION once … … 82 83 gitsha = subprocess.check_output(gitcmd).strip().decode('utf8') 83 84 except Exception as e: 84 print('git command error :%s' % e)85 sys.stderr.write('git command error :%s\n' % e) 85 86 return None 86 87 # check if we have a clean tree … … 89 90 output = subprocess.check_output(gitcmd).decode('utf8') 90 91 if len(output): 91 print('Info: current tree is not clean\n')92 print(output)92 sys.stderr.write('Info: current tree is not clean\n\n') 93 sys.stderr.write(output + '\n') 93 94 gitsha += '+mods' 94 95 except subprocess.CalledProcessError as e: 95 print (e)96 sys.stderr.write('git command error :%s\n' % e) 96 97 pass 97 98 return gitsha 98 99 99 100 if __name__ == '__main__': 100 print ('%30s'% 'aubio version:', get_aubio_version()) 101 print ('%30s'% 'python-aubio version:', get_aubio_pyversion()) 101 if len(sys.argv) > 1 and sys.argv[1] == '-v': 102 print (get_aubio_version()) 103 elif len(sys.argv) > 1 and sys.argv[1] == '-p': 104 print (get_aubio_version()) 105 else: 106 print ('%30s'% 'aubio version:', get_aubio_version()) 107 print ('%30s'% 'python-aubio version:', get_aubio_pyversion())
Note: See TracChangeset
for help on using the changeset viewer.