Skip to content

Commit

Permalink
Fix dev/deps.py to work on Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
wbond committed Mar 6, 2022
1 parent 557a900 commit 9e067d2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dev/deps.py
Expand Up @@ -638,7 +638,17 @@ def _parse_requires(path):
package = package.strip()
cond = cond.strip()
cond = cond.replace('sys_platform', repr(sys_platform))
cond = cond.replace('python_version', repr(python_version))
cond = re.sub(
r'[\'"]'
r'(\d+(?:\.\d+)*)'
r'([-._]?(?:alpha|a|beta|b|preview|pre|c|rc)\.?\d*)?'
r'(-\d+|(?:[-._]?(?:rev|r|post)\.?\d*))?'
r'([-._]?dev\.?\d*)?'
r'[\'"]',
r'_tuple_from_ver(\g<0>)',
cond
)
cond = cond.replace('python_version', '_tuple_from_ver(%r)' % python_version)
if not eval(cond):
continue
else:
Expand Down

0 comments on commit 9e067d2

Please sign in to comment.