diff --git a/.evergreen/scripts/install-dependencies.sh b/.evergreen/scripts/install-dependencies.sh index ec389690ca..5425d10c8c 100755 --- a/.evergreen/scripts/install-dependencies.sh +++ b/.evergreen/scripts/install-dependencies.sh @@ -10,6 +10,12 @@ if [ -f $HERE/env.sh ]; then . $HERE/env.sh fi +# Set up the default bin directory. +if [ -z "${PYMONGO_BIN_DIR:-}" ]; then + PYMONGO_BIN_DIR="$HOME/.local/bin" + export PATH="$PYMONGO_BIN_DIR:$PATH" +fi + # Helper function to pip install a dependency using a temporary python env. function _pip_install() { _HERE=$(dirname ${BASH_SOURCE:-$0}) @@ -41,10 +47,6 @@ if ! command -v just &>/dev/null; then if [ "Windows_NT" = "${OS:-}" ]; then _TARGET="--target x86_64-pc-windows-msvc" fi - if [ -z "${PYMONGO_BIN_DIR:-}" ]; then - echo "Please install just!" - exit 1 - fi _BIN_DIR=$PYMONGO_BIN_DIR echo "Installing just..." mkdir -p "$_BIN_DIR" 2>/dev/null || true @@ -56,10 +58,6 @@ fi # Ensure uv is installed. if ! command -v uv &>/dev/null; then - if [ -z "${PYMONGO_BIN_DIR:-}" ]; then - echo "Please install uv!" - exit 1 - fi _BIN_DIR=$PYMONGO_BIN_DIR echo "Installing uv..." # On most systems we can install directly. diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index c9195b638a..7a8f9640f8 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -193,6 +193,6 @@ def run_command(cmd: str | list[str], **kwargs: Any) -> None: def create_archive() -> str: run_command("git add .", cwd=ROOT) - run_command('git commit -m "add files"', check=False, cwd=ROOT) + run_command('git commit --no-verify -m "add files"', check=False, cwd=ROOT) run_command(f"git archive -o {TMP_DRIVER_FILE} HEAD", cwd=ROOT) return TMP_DRIVER_FILE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 369e688b1e..e0b6260e21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -231,6 +231,17 @@ the pages will re-render and the browser will automatically refresh. - Run `just setup-tests encryption`. - Run the tests with `just run-tests`. +To test with `encryption` and `PyOpenSSL`, use `just setup-tests encryption pyopenssl`. + +### PyOpenSSL tests + +- Run `just run-server` to start the server. +- Run `just setup-tests default_sync pyopenssl`. +- Run the tests with `just run-tests`. + +Note: `PyOpenSSL` is not used in async tests, but you can use `just setup-tests default_async pyopenssl` +to verify that PyMongo falls back to the standard library `OpenSSL`. + ### Load balancer tests - Install `haproxy` (available as `brew install haproxy` on macOS).