Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Sep 5, 2024
1 parent 783c000 commit bbf8be2
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions bindings/python/.evergreen/integ-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,19 @@ pushd $(pwd)/libmongocrypt/bindings/python
BASE_PYTHON=$(find_python3)

# MONGOCRYPT_DIR is set by libmongocrypt/.evergreen/config.yml
# MONGOCRYPT_DIR="$MONGOCRYPT_DIR"
MONGOCRYPT_DIR="$MONGOCRYPT_DIR"
CRYPT_SHARED_DIR="$DRIVERS_TOOLS"

MACHINE=$(uname -m)
if [ $MACHINE == "aarch64" ]; then
PYTHON="/opt/mongodbtoolchain/v4/bin/python3"
TARGET_CRYPT=rhel82
TARGET_LIB=rhel-82-arm64
PYMONGOCRYPT_LIB="${MONGOCRYPT_DIR}/lib/libmongocrypt.so"
else
TARGET_CRYPT=rhel80
TARGET_LIB=rhel-80-64-bit
PYTHON="/opt/python/3.13/bin/python3"
fi
LIBMONGOCRYPT_URL="https://s3.amazonaws.com/mciuploads/libmongocrypt/$TARGET_LIB/master/latest/libmongocrypt.tar.gz"
curl -O "$LIBMONGOCRYPT_URL"
mkdir libmongocrypt
tar xzf libmongocrypt.tar.gz -C ./libmongocrypt
MONGOCRYPT_DIR=./libmongocrypt/nocrypto
BASE=$(pwd)/libmongocrypt/nocrypto
if [ -f "${BASE}/lib/libmongocrypt.so" ]; then
PYMONGOCRYPT_LIB=${BASE}/lib/libmongocrypt.so
elif [ -f "${BASE}/lib/libmongocrypt.dylib" ]; then
PYMONGOCRYPT_LIB=${BASE}/lib/libmongocrypt.dylib
elif [ -f "${BASE}/bin/mongocrypt.dll" ]; then
PYMONGOCRYPT_LIB=${BASE}/bin/mongocrypt.dll
# libmongocrypt's windows dll is not marked executable.
chmod +x $PYMONGOCRYPT_LIB
PYMONGOCRYPT_LIB=$(cygpath -m $PYMONGOCRYPT_LIB)
elif [ -f "${BASE}/lib64/libmongocrypt.so" ]; then
PYMONGOCRYPT_LIB=${BASE}/lib64/libmongocrypt.so
else
echo "Cannot find libmongocrypt shared object file"
exit 1
PYMONGOCRYPT_LIB="${MONGOCRYPT_DIR}/lib64/libmongocrypt.so"
fi
export PYMONGOCRYPT_LIB

CRYPT_SHARED_DIR="$DRIVERS_TOOLS"

createvirtualenv $PYTHON .venv
pip install -e .
pushd $PYMONGO_DIR
Expand Down

0 comments on commit bbf8be2

Please sign in to comment.