From 7e05feaf8db363ea92a1d2ddb43a0a6df2e368c9 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Wed, 11 Nov 2020 21:58:08 +0100 Subject: [PATCH] Craft build process to reveal the negative testing and focus on packaging jobs --- .azure-pipelines/templates/jobs/packaging-jobs.yml | 2 +- .../templates/stages/test-and-package-stage.yml | 4 ++-- snap/snapcraft.yaml | 1 + tools/docker/core/Dockerfile | 4 ++-- tools/pipstrap_constraints.txt | 12 +++--------- windows-installer/construct.py | 3 ++- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.azure-pipelines/templates/jobs/packaging-jobs.yml b/.azure-pipelines/templates/jobs/packaging-jobs.yml index f0c6b6e49..70d176aef 100644 --- a/.azure-pipelines/templates/jobs/packaging-jobs.yml +++ b/.azure-pipelines/templates/jobs/packaging-jobs.yml @@ -144,7 +144,7 @@ jobs: git config --global user.name "$(Build.RequestedFor)" mkdir -p ~/.local/share/snapcraft/provider/launchpad cp $(credentials.secureFilePath) ~/.local/share/snapcraft/provider/launchpad/credentials - python3 tools/snap/build_remote.py ALL --archs ${ARCHS} + python3 tools/snap/build_remote.py certbot --archs ${ARCHS} displayName: Build snaps - script: | set -e diff --git a/.azure-pipelines/templates/stages/test-and-package-stage.yml b/.azure-pipelines/templates/stages/test-and-package-stage.yml index 26010644d..867277c8d 100644 --- a/.azure-pipelines/templates/stages/test-and-package-stage.yml +++ b/.azure-pipelines/templates/stages/test-and-package-stage.yml @@ -1,6 +1,6 @@ stages: - stage: TestAndPackage jobs: - - template: ../jobs/standard-tests-jobs.yml - - template: ../jobs/extended-tests-jobs.yml +# - template: ../jobs/standard-tests-jobs.yml +# - template: ../jobs/extended-tests-jobs.yml - template: ../jobs/packaging-jobs.yml diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9be353499..a96fb8bb7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -75,6 +75,7 @@ parts: build-environment: - SNAPCRAFT_PYTHON_VENV_ARGS: --system-site-packages - PIP_CONSTRAINT: $SNAPCRAFT_PART_SRC/snap-constraints.txt + - PIP_NO_BINARY: cryptography override-pull: | snapcraftctl pull cd $SNAPCRAFT_PART_SRC diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 4053f7f31..2c6a9d207 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -41,6 +41,6 @@ RUN apk add --no-cache --virtual .build-deps \ openssl-dev \ musl-dev \ libffi-dev \ - && python tools/pipstrap.py \ - && python tools/pip_install_editable.py src/acme src/certbot \ + #&& python tools/pipstrap.py \ + && PIP_NO_BINARY=cryptography python tools/pip_install_editable.py src/acme src/certbot \ && apk del .build-deps diff --git a/tools/pipstrap_constraints.txt b/tools/pipstrap_constraints.txt index 5de9e147d..4d89a939a 100644 --- a/tools/pipstrap_constraints.txt +++ b/tools/pipstrap_constraints.txt @@ -7,12 +7,6 @@ # An older version of setuptools is currently used here in order to keep # compatibility with Python 2 since newer versions of setuptools have dropped # support for it. -pip==20.2.4 \ - --hash=sha256:51f1c7514530bd5c145d8f13ed936ad6b8bfcb8cf74e10403d0890bc986f0033 \ - --hash=sha256:85c99a857ea0fb0aedf23833d9be5c40cf253fe24443f0829c7b472e23c364a1 -setuptools==44.1.1 \ - --hash=sha256:27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5 \ - --hash=sha256:c67aa55db532a0dadc4d2e20ba9961cbd3ccc84d544e9029699822542b5a476b -wheel==0.35.1 \ - --hash=sha256:497add53525d16c173c2c1c733b8f655510e909ea78cc0e29d374243544b77a2 \ - --hash=sha256:99a22d87add3f634ff917310a3d87e499f19e663413a52eb9232c447aa646c9f +pip==20.2.4 +setuptools==99.99.0 +wheel==0.35.1 diff --git a/windows-installer/construct.py b/windows-installer/construct.py index 1ce4811ac..21fbedaca 100644 --- a/windows-installer/construct.py +++ b/windows-installer/construct.py @@ -56,7 +56,8 @@ def _compile_wheels(repo_path, build_path, venv_python): def _prepare_build_tools(venv_path, venv_python, repo_path): print('Prepare build tools') subprocess.check_call([sys.executable, '-m', 'venv', venv_path]) - subprocess.check_call([venv_python, os.path.join(repo_path, 'tools', 'pipstrap.py')]) + #subprocess.check_call([venv_python, os.path.join(repo_path, 'tools', 'pipstrap.py')]) + subprocess.check_call([venv_python, '-m', 'pip', 'install', '--upgrade', 'pip==20.2.4', 'setuptools==44.1.1', 'wheel==0.35.1']) subprocess.check_call([venv_python, os.path.join(repo_path, 'tools', 'pip_install.py'), 'pynsist']) subprocess.check_call(['choco', 'upgrade', '--allow-downgrade', '-y', 'nsis', '--version', NSIS_VERSION])