comparison setup.py @ 7647:f7256cd9beff

recover when no version information is available
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 15 Jan 2009 11:41:59 +0100
parents 9626819b2e3d
children 02e358a3a8a7
comparison
equal deleted inserted replaced
7646:e62a456b8dc5 7647:f7256cd9beff
95 95
96 try: 96 try:
97 l = os.popen('hg id -it').read().split() 97 l = os.popen('hg id -it').read().split()
98 while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags 98 while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags
99 l.pop() 99 l.pop()
100 version = l[-1] or 'unknown' # latest tag or revision number 100 version = l and l[-1] or 'unknown' # latest tag or revision number
101 if version.endswith('+'): 101 if version.endswith('+'):
102 version += time.strftime('%Y%m%d') 102 version += time.strftime('%Y%m%d')
103 103
104 except OSError: 104 except OSError:
105 version = "unknown" 105 version = "unknown"