File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
test-integration/test_integration Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1212from packaging .version import VERSION_PATTERN
1313
1414# From the SemVer spec: https://semver.org/
15- SEMVER_PATTERN = r"^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9A-Za-z-]{1,9})[0-9A-Za-z-]* (?:\.[0-9A-Za-z -]+)*)?$"
15+ SEMVER_PATTERN = r"^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+ (?:\.[0-9a-zA-Z -]+)*) )?$"
1616
1717
1818# Used to help ensure that the cog binary reports a semver version that matches
@@ -93,7 +93,7 @@ def assert_versions_match(semver_version: str, pep440_version: str):
9393 if semver_pre .startswith ("dev" ):
9494 assert pep440_groups ["dev_l" ] == "dev" , "Dev build status does not match"
9595
96- assert semver_groups [ "buildmetadata" ] == pep440_groups [ "local" ] , (
96+ assert pep440_groups [ "local" ]. startswith ( semver_groups [ "buildmetadata" ]) , (
9797 f"Local/build metadata component does not match: { semver_groups ['buildmetadata' ]} != { pep440_groups ['local' ]} "
9898 )
9999
You can’t perform that action at this time.
0 commit comments