Update wheel scripts to match what Jenkins has (#3459)

* Include python3.6 in the macOS wheel script

* Pull in changes from Jenkins

* For Windows as well
diff --git a/.jenkins/mac-wheel.sh b/.jenkins/mac-wheel.sh
index 3a6bf64..4056ccc 100644
--- a/.jenkins/mac-wheel.sh
+++ b/.jenkins/mac-wheel.sh
@@ -1,9 +1,13 @@
 #!/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
+
+# 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
+# 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 -)"
+# 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
 
@@ -28,6 +32,9 @@
         py35)
             PYTHON=python3.5
             ;;
+        py36)
+            PYTHON=python3.6
+            ;;
         pypy)
             PYTHON=pypy
             ;;
@@ -46,14 +53,18 @@
         py35)
             PYTHON=/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
             ;;
+        py36)
+            PYTHON=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
+            ;;
     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
+# upgrade wheel to latest before we use it to build the wheel
+pip install -U wheel
+CRYPTOGRAPHY_OSX_NO_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" 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'`
diff --git a/.jenkins/windows-wheel.bat b/.jenkins/windows-wheel.bat
index 17883e3..356226a 100644
--- a/.jenkins/windows-wheel.bat
+++ b/.jenkins/windows-wheel.bat
@@ -1,5 +1,6 @@
 wmic qfe
 @set PATH="C:\Python27";"C:\Python27\Scripts";%PATH%
+@set CRYPTOGRAPHY_WINDOWS_LINK_OPENSSL110=1
 SET
 if "%TOXENV%" == "py26" (
     @set PYTHON="C:\Python26\python.exe"
@@ -15,6 +16,20 @@
 )
 if "%TOXENV%" == "py35" (
     @set PYTHON="C:\Python35\python.exe"
+)
+if "%TOXENV%" == "py36" (
+    @set PYTHON="C:\Python36\python.exe"
+)
+
+@set py35orabove=true
+
+if not "%TOXENV%" == "py35" (
+    if not "%TOXENV%" == "py36" (
+        @set py35orabove=false
+    )
+)
+
+if "%py35orabove%" == "true" (
     if %label% == windows (
         @set INCLUDE="C:\OpenSSL-Win32-2015\include";%INCLUDE%
         @set LIB="C:\OpenSSL-Win32-2015\lib";%LIB%
@@ -39,4 +54,4 @@
 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'))"
+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'))"
\ No newline at end of file