aboutsummaryrefslogtreecommitdiffstats
path: root/.azure-pipelines/wheel-builder.yml
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2019-05-05 22:02:24 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2019-05-05 22:02:24 -0400
commita4d272a54e85bdca8f9dfdea9c03b16a701e1a93 (patch)
tree34efa6c7b1bb0a7357d1b81059de6a10cdbdf892 /.azure-pipelines/wheel-builder.yml
parentef0ed84180f9247e7cf2402b780536c359c4778e (diff)
downloadcryptography-a4d272a54e85bdca8f9dfdea9c03b16a701e1a93.tar.gz
cryptography-a4d272a54e85bdca8f9dfdea9c03b16a701e1a93.tar.bz2
cryptography-a4d272a54e85bdca8f9dfdea9c03b16a701e1a93.zip
Rename macos-wheels.yml to wheel-builder.yml (#4872)
Diffstat (limited to '.azure-pipelines/wheel-builder.yml')
-rw-r--r--.azure-pipelines/wheel-builder.yml68
1 files changed, 68 insertions, 0 deletions
diff --git a/.azure-pipelines/wheel-builder.yml b/.azure-pipelines/wheel-builder.yml
new file mode 100644
index 00000000..7770757d
--- /dev/null
+++ b/.azure-pipelines/wheel-builder.yml
@@ -0,0 +1,68 @@
+trigger: none
+pr: none
+
+jobs:
+ - job: 'mac'
+ pool:
+ vmImage: 'macOS-10.14'
+ strategy:
+ matrix:
+ Python27:
+ python.version: '2.7'
+ PYTHON_DOWNLOAD_URL: "https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.6.pkg"
+ PYTHON_BIN_PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin/python
+ Python3:
+ python.version: '3.4'
+ PYTHON_DOWNLOAD_URL: "https://www.python.org/ftp/python/3.7.3/python-3.7.3-macosx10.6.pkg"
+ PYTHON_BIN_PATH: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
+ steps:
+ - script: |
+ set -e
+ set -x
+
+ curl "$PYTHON_DOWNLOAD_URL" -o python.pkg
+ sudo installer -pkg python.pkg -target /
+ displayName: Download and install Python
+
+ - script: brew update
+ displayName: Update brew
+ - script: brew install openssl@1.1
+ displayName: Install OpenSSL with brew
+
+ - script: $PYTHON_BIN_PATH -m pip install -U virtualenv
+ displayName: Install virtualenv
+ - script: $PYTHON_BIN_PATH -m virtualenv .venv
+ displayName: Create virtualenv
+ - script: .venv/bin/pip install -U wheel
+ displayName: Update wheel to the latest version
+ - script: .venv/bin/pip install cffi six idna asn1crypto ipaddress "enum34; python_version < '3'"
+ displayName: Install our Python dependencies
+
+ - script: |
+ set -e
+ set -x
+
+ REGEX="3\.([0-9])*"
+ if [[ "$PYTHON_VERSION" =~ $REGEX ]]; then
+ PY_LIMITED_API="--build-option --py-limited-api=cp3${BASH_REMATCH[1]}"
+ fi
+
+ CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS="1" \
+ LDFLAGS="/usr/local/opt/openssl@1.1/lib/libcrypto.a /usr/local/opt/openssl@1.1/lib/libssl.a" \
+ CFLAGS="-I/usr/local/opt/openssl@1.1/include -mmacosx-version-min=10.9" \
+ .venv/bin/pip wheel cryptography==$BUILD_VERSION --no-use-pep517 --wheel-dir=wheelhouse --no-binary cryptography --no-deps $PY_LIMITED_API
+ displayName: Build the wheel
+ - script: .venv/bin/pip install --no-index -f wheelhouse cryptography
+ 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
+ - script: otool -L `find .venv -name '_openssl*.so'`
+ displayName: Print everything we link against
+ - script: lipo -info `find .venv -name '*.so'`
+ displayName: Print the architectures in our fat mach-o binary
+ - script: otool -L `find .venv -name '_openssl*.so'` | grep -vG "libcrypto\\|libssl"
+ displayName: Verify that we did not link against OpenSSL
+
+ - upload: wheelhouse/
+ artifact: cryptography-python$(python.version)