Codebase list sugar-toolkit-gtk3 / 002349f
NormalizedVersion - accept ~ as version separator Bundle versions are often described as being decimal floats e.g. 1.2, but they also accept more than one dot, and a suffix after a dash, e.g. 1.2.3-peru Debian project and Ubuntu often use ~ for modified sources to comply with distribution policy (~dfsg), or developer builds. The dist_source target for setup.py does not work with a version suffix like ~dfsg, requiring a manual step to rename the file. Adjust the regular expression to accept the ~ form. James Cameron 6 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
3131 (?P<version>\d+) # minimum 'N'
3232 (?P<extraversion>(?:\.\d+)*) # any number of extra '.N' segments
3333 (?:
34 (?P<local>\-[a-zA-Z]*) # ignore any string in the comparison
34 (?P<local>[\-\~].[a-zA-Z]*) # ignore any string in the comparison
3535 )?
3636 $''', re.VERBOSE)
3737
4444 1.2
4545 1.2.3
4646 1.2.3-peru
47 1.2.3~dfsg
4748
4849 Bad:
4950 1.2peru # must be separated with -