diff --git a/tests/ci/integration/python_patch/main/aws-lc-cpython.patch b/tests/ci/integration/python_patch/main/aws-lc-cpython.patch deleted file mode 100644 index c1b7cf7a9f..0000000000 --- a/tests/ci/integration/python_patch/main/aws-lc-cpython.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/Modules/Setup b/Modules/Setup -index a066982..3d7fbc3 100644 ---- a/Modules/Setup -+++ b/Modules/Setup -@@ -213,11 +213,11 @@ PYTHONPATH=$(COREPYTHONPATH) - #_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto - - # To statically link OpenSSL: --# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ --# -l:libssl.a -Wl,--exclude-libs,libssl.a \ --# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a --# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ --# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a -+_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ -+ -l:libssl.a -Wl,--exclude-libs,libssl.a \ -+ -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a -+_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ -+ -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a - - # The _tkinter module. - # diff --git a/tests/ci/integration/run_python_integration.sh b/tests/ci/integration/run_python_integration.sh index 221a14d648..de3521cda9 100755 --- a/tests/ci/integration/run_python_integration.sh +++ b/tests/ci/integration/run_python_integration.sh @@ -207,9 +207,18 @@ cd ${SCRATCH_FOLDER} mkdir -p ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} +# Link AWS-LC dynamically against CPython's main, statically against +# versioned releases. +if [[ "${1}" == "main" ]]; then + BUILD_SHARED_LIBS="ON" + export LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib" +else + BUILD_SHARED_LIBS="OFF" +fi + aws_lc_build ${SRC_ROOT} ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} \ -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=0 \ + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ -DFIPS=${FIPS} fetch_crt_python @@ -221,6 +230,8 @@ pushd ${PYTHON_SRC_FOLDER} which sysctl && ( sysctl -w net.ipv6.conf.all.disable_ipv6=0 || /bin/true ) echo 0 >/proc/sys/net/ipv6/conf/all/disable_ipv6 || /bin/true +export LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib" + # NOTE: As we add more versions to support, we may want to parallelize here for branch in "$@"; do python_patch ${branch}