Changeset f432bb1
- Timestamp:
- Jan 21, 2017, 8:37:56 PM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
- Children:
- 227aa1c
- Parents:
- 8f0db97
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/moresetuptools.py
r8f0db97 rf432bb1 4 4 import distutils, distutils.command.clean, distutils.dir_util 5 5 from .gen_external import generate_external, header, output_path 6 7 def get_aubio_version(): 8 # read from VERSION 9 this_file_dir = os.path.dirname(os.path.abspath(__file__)) 10 version_file = os.path.join(this_file_dir, '..', '..', 'VERSION') 11 12 if not os.path.isfile(version_file): 13 raise SystemError("VERSION file not found.") 14 15 for l in open(version_file).readlines(): 16 #exec (l.strip()) 17 if l.startswith('AUBIO_MAJOR_VERSION'): 18 AUBIO_MAJOR_VERSION = int(l.split('=')[1]) 19 if l.startswith('AUBIO_MINOR_VERSION'): 20 AUBIO_MINOR_VERSION = int(l.split('=')[1]) 21 if l.startswith('AUBIO_PATCH_VERSION'): 22 AUBIO_PATCH_VERSION = int(l.split('=')[1]) 23 if l.startswith('AUBIO_VERSION_STATUS'): 24 AUBIO_VERSION_STATUS = l.split('=')[1].strip()[1:-1] 25 26 if AUBIO_MAJOR_VERSION is None or AUBIO_MINOR_VERSION is None \ 27 or AUBIO_PATCH_VERSION is None: 28 raise SystemError("Failed parsing VERSION file.") 29 30 verstr = '.'.join(map(str, [AUBIO_MAJOR_VERSION, 31 AUBIO_MINOR_VERSION, 32 AUBIO_PATCH_VERSION])) 33 34 if AUBIO_VERSION_STATUS is not None: 35 verstr += AUBIO_VERSION_STATUS 36 return verstr 37 38 def get_aubio_pyversion(): 39 verstr = get_aubio_version() 40 if '~alpha' in verstr: 41 verstr = verstr.split('~')[0] + 'a1' 42 return verstr 6 43 7 44 # inspired from https://gist.github.com/abergmeier/9488990 -
setup.py
r8f0db97 rf432bb1 7 7 from python.lib.gen_external import generate_external, header, output_path 8 8 9 # read from VERSION 10 for l in open('VERSION').readlines(): exec (l.strip()) 11 12 if AUBIO_MAJOR_VERSION is None or AUBIO_MINOR_VERSION is None \ 13 or AUBIO_PATCH_VERSION is None: 14 raise SystemError("Failed parsing VERSION file.") 15 16 __version__ = '.'.join(map(str, [AUBIO_MAJOR_VERSION, 17 AUBIO_MINOR_VERSION, 18 AUBIO_PATCH_VERSION])) 19 if AUBIO_VERSION_STATUS is not None: 20 if AUBIO_VERSION_STATUS.startswith('~'): 21 AUBIO_VERSION_STATUS = AUBIO_VERSION_STATUS[1:] 22 #__version__ += AUBIO_VERSION_STATUS 9 __version__ = get_aubio_pyversion() 23 10 24 11 include_dirs = []
Note: See TracChangeset
for help on using the changeset viewer.