From 05b602918fce33320f11d69d211b182ea45774b0 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Tue, 3 Nov 2020 16:24:38 +0100 Subject: [PATCH] Revert "Version 3.7.2" This reverts commit 082097b9538b32150568a09c50813657ae2a6cc5. --- CHANGELOG.md | 2 -- pyproject.toml | 2 +- utils/precompile_wheels.py | 63 ++++++++------------------------------ 3 files changed, 13 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04b1acdf..108780a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,6 @@ # Changelog ## master - CURRENT - -## 3.7.2 - 03/11/2020 ### Added * Add Python 3.9 official support diff --git a/pyproject.toml b/pyproject.toml index 0b43ad00..d1344b20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "poetry.masonry.api" [tool.poetry] name = "dnsrobocert" -version = "3.7.2" +version = "3.7.1" description = "A tool to manage your DNS-challenged TLS certificates" license = "MIT" keywords = [ diff --git a/utils/precompile_wheels.py b/utils/precompile_wheels.py index 3ff92492..1c37b609 100644 --- a/utils/precompile_wheels.py +++ b/utils/precompile_wheels.py @@ -11,15 +11,7 @@ BUILD_JSON = os.path.join(WHEELS_DIR, "build.json") TARGETS = ["cryptography", "cffi", "lxml"] -ARCHS = [ - "linux/amd64", - "linux/386", - "linux/arm64", - "linux/arm/v7", - "linux/arm/v6", - "linux/ppc64le", - "linux/s390x", -] +ARCHS = ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6", "linux/ppc64le", "linux/s390x"] PYTHON_VERSION = "3.8" ALPINE_VERSION = "3.12" @@ -58,16 +50,14 @@ def _need_rebuild(requirements): def _extract_req(requirement): - match = re.match(r"^(.*)==(.*?)(?:$|;\w*.*$)", requirement) + match = re.match(r'^(.*)==(.*?)(?:$|;\w*.*$)', requirement) return match.group(1), match.group(2) def main(): with tempfile.TemporaryDirectory() as workspace: - output = subprocess.check_output( - ["poetry", "export", "--format", "requirements.txt", "--without-hashes"], - universal_newlines=True, - ) + output = subprocess.check_output(["poetry", "export", "--format", "requirements.txt", "--without-hashes"], + universal_newlines=True) requirements = [] for entry in output.split("\n"): if re.match(rf"^({'|'.join(TARGETS)}).*$", entry): @@ -87,55 +77,26 @@ def main(): with open(os.path.join(workspace, "Dockerfile"), "w") as file_h: file_h.write(DOCKERFILE) - subprocess.check_call( - [ - "docker", - "run", - "--rm", - "--privileged", - "docker.io/multiarch/qemu-user-static", - "--reset", - "-p", - "yes", - ] - ) + subprocess.check_call(["docker", "run", "--rm", "--privileged", + "docker.io/multiarch/qemu-user-static", "--reset", "-p", "yes"]) subprocess.check_call(["docker", "buildx", "create", "--use"]) - subprocess.check_call( - [ - "docker", - "buildx", - "build", - "--platform", - ",".join(ARCHS), - f"--output=type=local,dest={workspace}", - "--tag", - "dnsrobocert-wheels", - workspace, - ] - ) + subprocess.check_call(["docker", "buildx", "build", "--platform", ",".join(ARCHS), + f"--output=type=local,dest={workspace}", "--tag", "dnsrobocert-wheels", workspace]) if os.path.exists(WHEELS_DIR): shutil.rmtree(WHEELS_DIR) for arch in ARCHS: arch = arch.replace("/", "_") - shutil.copytree( - os.path.join(workspace, arch, "precompiled-wheels"), - WHEELS_DIR, - dirs_exist_ok=True, - ) - - extracted_requirements = [ - _extract_req(requirement) for requirement in requirements - ] + shutil.copytree(os.path.join(workspace, arch, "precompiled-wheels"), WHEELS_DIR, dirs_exist_ok=True) + + extracted_requirements = [_extract_req(requirement) for requirement in requirements] build_data = { "python_version": PYTHON_VERSION, "alpine_version": ALPINE_VERSION, - "packages": { - package: version for package, version in extracted_requirements - }, + "packages": {package: version for package, version in extracted_requirements} } with open(BUILD_JSON, "w") as file_h: