hutiefang76 opened a new pull request, #12464:
URL: https://github.com/apache/seatunnel/pull/12464

   ### Purpose of this pull request
   
   Fixes #12461. Running `seatunnel-cli/setup.sh` previously installed the CLI 
and its provider/development dependencies into whichever `python3` was on 
`PATH`; on older system pip/setuptools it could also fail at the editable-build 
hook. The script now creates and reuses `seatunnel-cli/.venv`, upgrades build 
tools inside it, and performs the editable install there. If `python3 -m venv` 
fails or creates an unusable environment, it clears the partial directory and 
tries `virtualenv`; a pre-existing unusable `.venv` is preserved and restored 
if both creation paths fail. The new local artifacts are ignored by Git.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Source users run `bash setup.sh`, then `source .venv/bin/activate` (or 
call `.venv/bin/seatunnel` directly). The English and Chinese CLI READMEs and 
setup output now show these steps. Distribution launchers and manual `pip 
install -e` remain unchanged.
   
   ### How was this patch tested?
   
   - Python 3.13: `python -m pytest tests -q` in `seatunnel-cli`: 195 passed, 3 
subtests passed.
   - `ruff check .` in `seatunnel-cli`: passed.
   - `bash -n seatunnel-cli/setup.sh`, `git diff --check`, and `mvn -q -o 
spotless:apply`: passed.
   - Ran the real `setup.sh` with Python 3.13, confirmed successful 
installation in `.venv` and `.venv/bin/seatunnel --help`; reran setup and 
confirmed it reports reuse of the same environment.
   - The three new isolated-script tests cover creation/reuse, removal of a 
partial venv before `virtualenv` fallback, and a failed creation that restores 
the old directory without invoking system pip.
   - Full offline `mvn -DskipTests verify` reached the unrelated 
`connector-cdc-db2` module and stopped because 
`io.debezium:debezium-connector-db2:1.9.8.Final` is absent from the local Maven 
cache. An initial attempt under local JDK 26 hit Lombok's compiler 
incompatibility; the JDK 17 run got past that point.
   
   Prepared with OpenAI Codex assistance; implementation and test results were 
checked locally.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to