Changeset b201912 for this_version.py


Ignore:
Timestamp:
Apr 11, 2017, 1:49:44 AM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
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.
Message:

Merge branch 'master' into sampler

Fixed conflicts:

python/lib/gen_external.py
src/io/source_avcodec.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • this_version.py

    rfbafd2c rb201912  
    11#! python
    22import os
     3import sys
    34
    45__version_info = {} # keep a reference to parse VERSION once
     
    8283        gitsha = subprocess.check_output(gitcmd).strip().decode('utf8')
    8384    except Exception as e:
    84         print('git command error :%s' % e)
     85        sys.stderr.write('git command error :%s\n' % e)
    8586        return None
    8687    # check if we have a clean tree
     
    8990        output = subprocess.check_output(gitcmd).decode('utf8')
    9091        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')
    9394            gitsha += '+mods'
    9495    except subprocess.CalledProcessError as e:
    95         print (e)
     96        sys.stderr.write('git command error :%s\n' % e)
    9697        pass
    9798    return gitsha
    9899
    99100if __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.