Skip to content

Instantly share code, notes, and snippets.

@quozl
Created June 14, 2017 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quozl/891386ccb02298c7e585dceda4311ff8 to your computer and use it in GitHub Desktop.
Save quozl/891386ccb02298c7e585dceda4311ff8 to your computer and use it in GitHub Desktop.
diff --git a/src/sugar3/bundle/bundleversion.py b/src/sugar3/bundle/bundleversion.py
index 972b8e1..31b71b6 100644
--- a/src/sugar3/bundle/bundleversion.py
+++ b/src/sugar3/bundle/bundleversion.py
@@ -32,7 +32,7 @@ VERSION_RE = re.compile(r'''
(?P<version>\d+) # minimum 'N'
(?P<extraversion>(?:\.\d+)*) # any number of extra '.N' segments
(?:
- (?P<local>\-[a-zA-Z]*) # ignore any string in the comparison
+ (?P<local>[\-\~].[a-zA-Z]*) # ignore any string in the comparison
)?
$''', re.VERBOSE)
@@ -45,6 +45,7 @@ class NormalizedVersion(object):
1.2
1.2.3
1.2.3-peru
+ 1.2.3~dfsg
Bad:
1.2peru # must be separated with -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment