diff options
author | Adrien Ferrand <adferrand@users.noreply.github.com> | 2021-02-24 02:29:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 02:29:52 +0300 |
commit | c3d6fca3eb1f24616bb784865662adfa048f9bf9 (patch) | |
tree | 90fda36cf97ed16b4cf8d6578f31781b0cd49330 /windows-installer | |
parent | c43f4fe518b48465b5cb886f2b1df1f3aed17616 (diff) |
Make certbot constraint file independent from certbot-auto + update cryptography (#8649)
* Refactor to not depend on certbot-auto dependencies pinning anymore
* Update constraints
* Replaces references
* Upgrade AWS dependencies pinning
* Fix script
* Fix Windows installer builds
* Fixing sdists letstest script
* Pin cryptography on 3.1.1 specifically for RHEL/CentOS 7 to avoid build failures during test_sdists test.
* Finish fix
* Fix VERSION_ID in RHEL 7
Diffstat (limited to 'windows-installer')
-rw-r--r-- | windows-installer/construct.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/windows-installer/construct.py b/windows-installer/construct.py index 60834e7e5..eb199a7e1 100644 --- a/windows-installer/construct.py +++ b/windows-installer/construct.py @@ -2,6 +2,7 @@ import contextlib import ctypes import os +import re import shutil import struct import subprocess @@ -52,6 +53,21 @@ def _compile_wheels(repo_path, build_path, venv_python): command.extend(wheels_project) subprocess.check_call(command, env=env) + # Cryptography uses now a unique wheel name "cryptography-VERSION-cpXX-abi3-win32.whl where + # cpXX is the lowest supported version of Python (eg. cp36 says that the wheel is compatible + # with Python 3.6+). While technically valid to describe a wheel compliant with the Stable + # Application Binary Interface, this naming convention makes pynsist falsely think that the + # wheel is compatible with Python 3.6 only. + # Let's trick pynsist by renaming the wheel until this is fixed upstream. + for file in os.listdir(wheels_path): + # Given that our Python version is 3.8, this rename files like + # cryptography-VERSION-cpXX-abi3-win32.whl into cryptography-VERSION-cp38-abi3-win32.whl + renamed = re.sub(r'^(.*)-cp\d+-abi3-(\w+)\.whl$', r'\1-cp{0}{1}-abi3-\2.whl' + .format(PYTHON_VERSION[0], PYTHON_VERSION[1]), file) + print(renamed) + if renamed != file: + os.replace(os.path.join(wheels_path, file), os.path.join(wheels_path, renamed)) + def _prepare_build_tools(venv_path, venv_python, repo_path): print('Prepare build tools') @@ -63,7 +79,7 @@ def _prepare_build_tools(venv_path, venv_python, repo_path): @contextlib.contextmanager def _prepare_constraints(repo_path): - reqs_certbot = os.path.join(repo_path, 'letsencrypt-auto-source', 'pieces', 'dependency-requirements.txt') + reqs_certbot = os.path.join(repo_path, 'tools', 'certbot_constraints.txt') reqs_pipstrap = os.path.join(repo_path, 'tools', 'pipstrap_constraints.txt') constraints_certbot = subprocess.check_output( [sys.executable, os.path.join(repo_path, 'tools', 'strip_hashes.py'), reqs_certbot], |