aboutsummaryrefslogtreecommitdiffstats
path: root/.jenkins
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-05-29 19:05:36 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2016-05-29 20:05:36 -0400
commitebe02ba61f2dadb1911b03fb3d4b214313c35d4d (patch)
tree9b2ddaf2a75f4489bab031e42f503c1216535f94 /.jenkins
parentda50a7ad9f451c123930656cf7fabadbe4f0524e (diff)
downloadcryptography-ebe02ba61f2dadb1911b03fb3d4b214313c35d4d.tar.gz
cryptography-ebe02ba61f2dadb1911b03fb3d4b214313c35d4d.tar.bz2
cryptography-ebe02ba61f2dadb1911b03fb3d4b214313c35d4d.zip
add the scripts we use to build the wheels in jenkins to version control (#2896)
* add the scripts we use to build the wheels in jenkins to version control These scripts will get some updates shortly to simplify life on the OS X side, but for now it's just a copy of exactly what the job currently does. Once this is merged I can switch the job to just invoke these scripts. * rename script and update to what we're currently using to make whls
Diffstat (limited to '.jenkins')
-rw-r--r--.jenkins/mac-wheel.sh61
-rw-r--r--.jenkins/windows-wheel.bat42
2 files changed, 103 insertions, 0 deletions
diff --git a/.jenkins/mac-wheel.sh b/.jenkins/mac-wheel.sh
new file mode 100644
index 00000000..3a6bf64b
--- /dev/null
+++ b/.jenkins/mac-wheel.sh
@@ -0,0 +1,61 @@
+#!/bin/bash -xe
+# output the list of things we've installed as a point in time check of how up to date the builder is
+/usr/sbin/system_profiler SPInstallHistoryDataType
+# Jenkins logs in as a non-interactive shell, so we don't even have /usr/local/bin in PATH
+export PATH=/usr/local/bin:$PATH
+# pyenv is nothing but trouble with non-interactive shells so we can't eval "$(pyenv init -)"
+export PATH="/Users/jenkins/.pyenv/shims:${PATH}"
+export PYENV_SHELL=bash
+
+# TODO: upgrade wheel builder VM and run it on El Cap with python.org Pythons.
+if [[ "${label}" == "10.10" ]]; then
+ case "${TOXENV}" in
+ py26)
+ PYTHON=/usr/bin/python2.6
+ ;;
+ py27)
+ PYTHON=/usr/bin/python2.7
+ ;;
+ py27u)
+ PYTHON=python2.7
+ ;;
+ py33)
+ PYTHON=python3.3
+ ;;
+ py34)
+ PYTHON=python3.4
+ ;;
+ py35)
+ PYTHON=python3.5
+ ;;
+ pypy)
+ PYTHON=pypy
+ ;;
+ esac
+else
+ case "${TOXENV}" in
+ py27)
+ PYTHON=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
+ ;;
+ py33)
+ PYTHON=/Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3
+ ;;
+ py34)
+ PYTHON=/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4
+ ;;
+ py35)
+ PYTHON=/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
+ ;;
+ esac
+fi
+printenv
+
+virtualenv .venv -p $PYTHON
+source .venv/bin/activate
+pip install -U wheel # upgrade wheel to latest before we use it to build the wheel
+CRYPTOGRAPHY_OSX_NO_LINK_FLAGS="1" LDFLAGS="/usr/local/opt/openssl/lib/libcrypto.a /usr/local/opt/openssl/lib/libssl.a" CFLAGS="-I/usr/local/opt/openssl/include" pip wheel cryptography --wheel-dir=wheelhouse --no-use-wheel
+pip install -f wheelhouse cryptography --no-index
+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'))"
+otool -L `find .venv -name '_openssl*.so'`
+lipo -info `find .venv -name '*.so'`
+otool -L `find .venv -name '_openssl*.so'` | grep -vG "libcrypto\|libssl"
diff --git a/.jenkins/windows-wheel.bat b/.jenkins/windows-wheel.bat
new file mode 100644
index 00000000..17883e3e
--- /dev/null
+++ b/.jenkins/windows-wheel.bat
@@ -0,0 +1,42 @@
+wmic qfe
+@set PATH="C:\Python27";"C:\Python27\Scripts";%PATH%
+SET
+if "%TOXENV%" == "py26" (
+ @set PYTHON="C:\Python26\python.exe"
+)
+if "%TOXENV%" == "py27" (
+ @set PYTHON="C:\Python27\python.exe"
+)
+if "%TOXENV%" == "py33" (
+ @set PYTHON="C:\Python33\python.exe"
+)
+if "%TOXENV%" == "py34" (
+ @set PYTHON="C:\Python34\python.exe"
+)
+if "%TOXENV%" == "py35" (
+ @set PYTHON="C:\Python35\python.exe"
+ if %label% == windows (
+ @set INCLUDE="C:\OpenSSL-Win32-2015\include";%INCLUDE%
+ @set LIB="C:\OpenSSL-Win32-2015\lib";%LIB%
+ ) else (
+ @set INCLUDE="C:\OpenSSL-Win64-2015\include";%INCLUDE%
+ @set LIB="C:\OpenSSL-Win64-2015\lib";%LIB%
+ )
+) else (
+ if %label% == windows (
+ @set INCLUDE="C:\OpenSSL-Win32-2010\include";%INCLUDE%
+ @set LIB="C:\OpenSSL-Win32-2010\lib";%LIB%
+ ) else (
+ @set INCLUDE="C:\OpenSSL-Win64-2010\include";%INCLUDE%
+ @set LIB="C:\OpenSSL-Win64-2010\lib";%LIB%
+ )
+)
+
+virtualenv -p %PYTHON% .release
+call .release\Scripts\activate
+pip install wheel virtualenv
+pip wheel cryptography --wheel-dir=wheelhouse --no-use-wheel
+for %%x in (wheelhouse\*.whl) do (
+ pip install %%x
+)
+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'))"