This is an automated email from the ASF dual-hosted git repository.

wenjin272 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git


The following commit(s) were added to refs/heads/main by this push:
     new 0d4d2381 [infra] Invoke the build scripts' Python tools through the 
interpreter (#979)
0d4d2381 is described below

commit 0d4d2381006daa010c38fca41d4189e0970253f0
Author: Weiqing Yang <[email protected]>
AuthorDate: Sat Aug 8 22:36:24 2026 -0700

    [infra] Invoke the build scripts' Python tools through the interpreter 
(#979)
    
    Generated-by: Claude Code 2.1.226
---
 tools/build.sh | 12 ++++++------
 tools/lint.sh  |  8 ++++----
 tools/ut.sh    | 10 +++++-----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/tools/build.sh b/tools/build.sh
index 6a691a59..a06ad01f 100755
--- a/tools/build.sh
+++ b/tools/build.sh
@@ -101,12 +101,12 @@ if $build_python; then
   # build python
   cd python
   rm -rf dist/  # Clean old build artifacts before building
-  pip install uv==0.11.0
-  uv lock
-  uv sync --extra dev
-  uv run python -m ensurepip --default-pip
-  uv run python -m build
-  uv pip install dist/*.whl
+  python3 -m pip install uv==0.11.0
+  python3 -m uv lock
+  python3 -m uv sync --extra dev
+  python3 -m uv run python -m ensurepip --default-pip
+  python3 -m uv run python -m build
+  python3 -m uv pip install --python .venv dist/*.whl
 
   rm -rf ${PYTHON_LIB_DIR}
 fi
\ No newline at end of file
diff --git a/tools/lint.sh b/tools/lint.sh
index bafd54b5..318d566b 100755
--- a/tools/lint.sh
+++ b/tools/lint.sh
@@ -74,10 +74,10 @@ install_python_deps() {
     # Try modern pyproject.toml first, then fallback to requirements.txt
     if [ -f "python/pyproject.toml" ]; then
       echo "Using pyproject.toml dependency groups"
-      pip install -e "python[lint]"
+      python3 -m pip install -e "python[lint]"
     else
       echo "Using legacy requirements.txt"
-      pip install -r python/requirements/linter_requirements.txt
+      python3 -m pip install -r python/requirements/linter_requirements.txt
     fi
   fi
 }
@@ -103,10 +103,10 @@ run_python_lint() {
     # Use traditional approach
     if [[ "$action" == "format" ]]; then
       echo "Executing Python format"
-      ruff check --fix python
+      python3 -m ruff check --fix python
     else
       echo "Executing Python format check"
-      ruff check --no-fix python
+      python3 -m ruff check --no-fix python
     fi
     return $?
   fi
diff --git a/tools/ut.sh b/tools/ut.sh
index 76876c79..b5ea0116 100755
--- a/tools/ut.sh
+++ b/tools/ut.sh
@@ -272,17 +272,17 @@ python_tests() {
                 if $verbose; then
                     echo "Using pyproject.toml dependency groups"
                 fi
-                pip install -e ".[test]"
-                pip install apache-flink~=${version}.0
+                python3 -m pip install -e ".[test]"
+                python3 -m pip install apache-flink~=${version}.0
             fi
             if $verbose; then
                 echo "Running tests with pytest..."
             fi
             if $run_e2e; then
-                pytest flink_agents -k "e2e_tests_integration" --reruns 2 
--reruns-delay 5 -o log_cli=true -o log_cli_level=${LOG_LEVEL:-OFF}
+                python3 -m pytest flink_agents -k "e2e_tests_integration" 
--reruns 2 --reruns-delay 5 -o log_cli=true -o log_cli_level=${LOG_LEVEL:-OFF}
                 rc1=$?
                 # Arm 2: integration-marked tests; trap exit code 5 as failure.
-                pytest flink_agents -m "integration" -o log_cli=true -o 
log_cli_level=${LOG_LEVEL:-OFF}
+                python3 -m pytest flink_agents -m "integration" -o 
log_cli=true -o log_cli_level=${LOG_LEVEL:-OFF}
                 rc2=$?
                 if [ $rc2 -eq 5 ]; then rc2=1; fi
                 # Logical-OR aggregation: any nonzero exit on either arm 
yields testcode=1.
@@ -291,7 +291,7 @@ python_tests() {
                 # on either arm indicates a selector regression).
                 testcode=$((rc1 || rc2))
             else
-                pytest flink_agents -k "not e2e_tests" -m "not integration" -o 
log_cli=true -o log_cli_level=${LOG_LEVEL:-OFF}
+                python3 -m pytest flink_agents -k "not e2e_tests" -m "not 
integration" -o log_cli=true -o log_cli_level=${LOG_LEVEL:-OFF}
                 testcode=$?
             fi
         fi

Reply via email to