diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2019-05-06 20:48:51 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-05-06 20:48:51 -0400 |
commit | a7e09d8b4f7c25fec4e270d9549dff521648ca3c (patch) | |
tree | 8b827b4be3664d6f8fd35d68fc547c9ae91fe534 | |
parent | 5a4d26e597933458053c4d1489528e2f48954448 (diff) | |
download | cryptography-a7e09d8b4f7c25fec4e270d9549dff521648ca3c.tar.gz cryptography-a7e09d8b4f7c25fec4e270d9549dff521648ca3c.tar.bz2 cryptography-a7e09d8b4f7c25fec4e270d9549dff521648ca3c.zip |
Add manylinux1 wheel builder to azure (#4873)
* Add manylinux1 wheel builder to azure
* ?
* Drop 32-bit manylinux1
* cleanup
* fix
* Run as root
* fix?
* Do it in a venv
* typo
* Added an extra step
* For debugging
* Fix
* computers are stupid
* gibberish
* fix?
-rw-r--r-- | .azure-pipelines/wheel-builder.yml | 57 | ||||
-rw-r--r-- | CHANGELOG.rst | 2 |
2 files changed, 57 insertions, 2 deletions
diff --git a/.azure-pipelines/wheel-builder.yml b/.azure-pipelines/wheel-builder.yml index 7770757d..1507b4b4 100644 --- a/.azure-pipelines/wheel-builder.yml +++ b/.azure-pipelines/wheel-builder.yml @@ -2,7 +2,7 @@ trigger: none pr: none jobs: - - job: 'mac' + - job: 'macOS' pool: vmImage: 'macOS-10.14' strategy: @@ -65,4 +65,57 @@ jobs: displayName: Verify that we did not link against OpenSSL - upload: wheelhouse/ - artifact: cryptography-python$(python.version) + artifact: cryptography-macos-python$(python.version) + + - job: 'manylinux1' + pool: + vmImage: 'ubuntu-16.04' + container: 'pyca/cryptography-manylinux1:x86_64' + strategy: + matrix: + Python27m: + PYTHON_VERSION: 'cp27-cp27m' + Python27mu: + PYTHON_VERSION: 'cp27-cp27mu' + Python3m: + PYTHON_VERSION: 'cp34-cp34m' + steps: + - script: /opt/python/$PYTHON_VERSION/bin/python -m virtualenv .venv + displayName: Create virtualenv + - script: .venv/bin/pip install cffi six idna asn1crypto ipaddress enum34 + displayName: Install our Python dependencies + - script: | + set -e + set -x + + REGEX="cp3([0-9])*" + if [[ "$PYTHON_VERSION" =~ $REGEX ]]; then + PY_LIMITED_API="--build-option --py-limited-api=cp3${BASH_REMATCH[1]}" + fi + LDFLAGS="-L/opt/pyca/cryptography/openssl/lib" \ + CFLAGS="-I/opt/pyca/cryptography/openssl/include -Wl,--exclude-libs,ALL" \ + .venv/bin/pip wheel cryptography==$BUILD_VERSION --no-use-pep517 --no-binary cryptography --no-deps --wheel-dir=tmpwheelhouse $PY_LIMITED_API + displayName: Build the wheel + - script: auditwheel repair tmpwheelhouse/cryptograph*.whl -w wheelhouse/ + displayName: Run auditwheel + - script: unzip wheelhouse/*.whl -d execstack.check + displayName: Unzip the wheel + - script: | + set -e + set -x + + results=$(execstack execstack.check/cryptography/hazmat/bindings/*.so) + count=$(echo "$results" | grep -c '^X' || true) + if [ "$count" -ne 0 ]; then + exit 1 + else + exit 0 + fi + displayName: Run execstack on the wheel + - script: .venv/bin/pip install cryptography==$BUILD_VERSION --no-index -f wheelhouse/ + displayName: Test installing the wheel + - script: | + .venv/bin/python -c "from cryptography.hazmat.backends.openssl.backend import backend;print('Loaded: ' + backend.openssl_version_text());print('Linked Against: ' + backend._ffi.string(backend._lib.OPENSSL_VERSION_TEXT).decode('ascii'))" + displayName: Print the OpenSSL we built and linked against + - upload: wheelhouse/ + artifact: cryptography-manylinux1-$(PYTHON_VERSION) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index df1a1fea..76e7a52a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,8 @@ Changelog .. note:: This version is not yet released and is under active development. +* **BACKWARDS INCOMPATIBLE:** We no longer distribute 32-bit ``manylinux1`` + wheels. Continuing to produce them was a maintenance burden. * **BACKWARDS INCOMPATIBLE:** Removed the ``cryptography.hazmat.primitives.mac.MACContext`` interface. The ``CMAC`` and ``HMAC`` APIs have not changed, but they are no longer registered as |