feat: support python 3.7

This commit is contained in:
youben11
2022-08-15 10:12:23 +01:00
committed by Ayoub Benaissa
parent 3aef4cd932
commit ecb70e2893
13 changed files with 276 additions and 1090 deletions

View File

@@ -16,18 +16,18 @@ MACOS = "macos"
OSES = {LINUX, MACOS}
PR_OSES = {LINUX: "ubuntu-20.04"}
PR_PYTHON_VERSIONS = ["3.8"]
PR_PYTHON_VERSIONS = ["3.7"]
PR_CONF = {"os": PR_OSES, "python": PR_PYTHON_VERSIONS}
PUSH_TO_MAIN_OSES = {LINUX: "ubuntu-20.04"}
PUSH_TO_MAIN_PYTHON_VERSIONS = ["3.8"]
PUSH_TO_MAIN_PYTHON_VERSIONS = ["3.7"]
PUSH_TO_MAIN_CONF = {"os": PUSH_TO_MAIN_OSES, "python": PUSH_TO_MAIN_PYTHON_VERSIONS}
WEEKLY_OSES = {
LINUX: "ubuntu-20.04",
MACOS: "macos-11",
}
WEEKLY_PYTHON_VERSIONS = ["3.8", "3.9"]
WEEKLY_PYTHON_VERSIONS = ["3.7", "3.8", "3.9"]
WEEKLY_CONF = {"os": WEEKLY_OSES, "python": WEEKLY_PYTHON_VERSIONS}
# The OSes here are to indicate the OSes used for runners during release
@@ -38,7 +38,7 @@ RELEASE_OSES = {
# MACOS: "macos-10.15",
}
# The python versions will be used to build packages during release
RELEASE_PYTHON_VERSIONS = ["3.8", "3.9"]
RELEASE_PYTHON_VERSIONS = ["3.7", "3.8", "3.9"]
RELEASE_CONF = {"os": RELEASE_OSES, "python": RELEASE_PYTHON_VERSIONS}
CONFIGURATIONS = {

View File

@@ -89,9 +89,8 @@ def main(args):
)
version_tags.append(potential_version_tag.string)
assert (
num_version_tags := len(version_tags) == 1
), f"Can only have 1 version tag, got {num_version_tags}"
num_version_tags = len(version_tags)
assert num_version_tags == 1, f"Can only have 1 version tag, got {num_version_tags}"
version_tag = version_tags[0]

View File

@@ -131,12 +131,15 @@ def main(args):
from_commit = None
if args.from_ref is None:
tags_by_name = {strip_leading_v(tag.name): tag for tag in repo.tags}
all_release_version_infos = {
version_info: tags_by_name[tag_name]
version_infos = {
VersionInfo.parse(tag_name): tag_name
for tag_name in tags_by_name
if VersionInfo.isvalid(tag_name)
and (version_info := VersionInfo.parse(tag_name))
and version_info.prerelease is None
}
all_release_version_infos = {
version_info: tags_by_name[tag_name]
for version_info, tag_name in version_infos.items()
if version_info.prerelease is None
}
log_msg(f"All release versions {all_release_version_infos}")

View File

@@ -34,12 +34,13 @@ def islatest(args):
)
# Keep versions that are not release candidate
all_non_prerelease_version_infos = [
version_info
version_infos = [
VersionInfo.parse(version_str)
for version_str in all_versions_str
if VersionInfo.isvalid(version_str)
and (version_info := VersionInfo.parse(version_str))
and version_info.prerelease is None
]
all_non_prerelease_version_infos = [
version_info for version_info in version_infos if version_info.prerelease is None
]
all_non_prerelease_version_infos.append(new_version_info)