Changeset 87a4a5a


Ignore:
Timestamp:
Mar 23, 2017, 6:03:22 PM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler
Children:
bef7726
Parents:
7b9b6ba
Message:

this_version.py: build a valid pep440 version string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • this_version.py

    r7b9b6ba r87a4a5a  
    7777    # convert to version for python according to pep 440
    7878    # see https://www.python.org/dev/peps/pep-0440/
    79     # outputs MAJ.MIN.PATCH+a0{.git<sha> , ''}
     79    # outputs MAJ.MIN.PATCH[a0[+git.<sha>[.mods]]]
    8080    vdict = get_version_info()
    8181    verstr = '%s.%s.%s' % get_aubio_version_tuple()
    8282    if add_status and vdict['AUBIO_VERSION_STATUS']:
    83         if '~git' in vdict['AUBIO_VERSION_STATUS']:
    84             verstr += "+a0." + vdict['AUBIO_VERSION_STATUS'][1:]
     83        if vdict['AUBIO_VERSION_STATUS'].startswith('~git+'):
     84            pep440str = vdict['AUBIO_VERSION_STATUS'].replace('+', '.')
     85            verstr += pep440str.replace('~git.', 'a0+')
    8586        elif '~alpha' in vdict['AUBIO_VERSION_STATUS']:
    86             verstr += "+a0"
     87            verstr += "a0"
    8788        else:
    8889            raise SystemError("Aubio version statut not supported : %s" %
Note: See TracChangeset for help on using the changeset viewer.