You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "det101 (via GitHub)" <gi...@apache.org> on 2026/09/24 01:45:03 UTC

[I] [Improve][CLI] Install the source setup into a project virtual environment [seatunnel]

det101 opened a new issue, #12461:
URL: https://github.com/apache/seatunnel/issues/12461

   ### Search before asking
   
   - [x] I had searched in the issues and found no similar requirement.
   
   ### Description
   
   `seatunnel-cli/setup.sh` runs `python3 -m pip install -e ".[dev]"` with whatever `python3` is on `PATH`. On a typical Debian/Ubuntu system Python this fails: pip 22 and setuptools 59 do not provide the `build_editable` hook, so the editable install errors with "build backend is missing the 'build_editable' hook". When the system pip is new enough to succeed, the CLI dependencies (`openai`, `boto3`, `anthropic`, and the rest of the `dev` extra) are installed into the shared interpreter and can change versions used by other projects.
   
   This is an improvement to the existing source-install path, not a new CLI feature. Install the source checkout into `seatunnel-cli/.venv`. That directory is already listed in `.gitignore`.
   
   - Reuse `.venv` when it already contains a working Python.
   - Otherwise create it with `python3 -m venv`. If that fails because `python3-venv` / `ensurepip` is missing, remove the partial directory and retry with `virtualenv`. If neither is available, exit with a message that names the missing package.
   - Inside the virtual environment, upgrade `pip`, `setuptools`, and `wheel`, then run `pip install -e ".[dev]"`.
   - Tell the user to run `source .venv/bin/activate` and then `seatunnel`. Without activation, `.venv/bin/seatunnel` still works. The installed script's shebang points at `.venv/bin/python`, so activation only puts that executable on `PATH`. It does not install packages into the system interpreter.
   
   ### Usage Scenario
   
   A developer clones the repository and runs `bash setup.sh` from `seatunnel-cli` to try the AI CLI. The command should finish on a stock system Python 3.10. Later `seatunnel` invocations from that activated shell should use only the project virtual environment.
   
   ### Related issues
   
   None.
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   
   ### Out of scope
   
   The distribution launcher `bin/seatunnel-ai.sh` stays as it is. A manual `pip install -e` can still target an environment the caller has already selected.


-- 
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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][CLI] Install the source setup into a project virtual environment [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #12461:
URL: https://github.com/apache/seatunnel/issues/12461#issuecomment-5814908853

   Classification: E / CLI source-install isolation.\n\nThanks for the precise proposal. Current dev confirms that seatunnel-cli/setup.sh directly runs python3 -m pip install -e ".[dev]", so the system-interpreter pollution and old editable-build failure are both real. I found the focused implementation at #12464; it is the single path for this issue.\n\nThe PR scope is appropriate: project-local .venv creation/reuse, fallback after cleanup, in-environment build-tool upgrade, documentation, and isolated script tests, while distribution launchers and manual pip installs remain unchanged. Please keep the Python 3.10+ check, ensure no system pip is invoked after virtual-environment creation is attempted, and retain the failure path that names the missing venv support rather than silently changing the caller environment.\n\nThe Build check is currently queued and the PR is BLOCKED, so this remains in progress rather than complete. Please keep discussion and any follow-up on #12464; no is
 sue metadata change is needed.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][CLI] Install the source setup into a project virtual environment [seatunnel]

Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #12461:
URL: https://github.com/apache/seatunnel/issues/12461#issuecomment-5826036430

   Thanks for the clear write-up. The implementation PR already linked above is the single path for this issue, so let's keep follow-up discussion there rather than re-litigating the proposal here. Its scope (project-local virtual environment for the editable source install, leaving distribution launchers and manual pip installs unchanged) matches the direction described in this issue, and the implementation expectations were already stated above, so I won't repeat them. This remains in progress until that PR lands; no issue metadata change is needed for now.
   
   <!-- streview-comment:1311 -->


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][CLI] Install the source setup into a project virtual environment [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #12461: [Improve][CLI] Install the source setup into a project virtual environment
URL: https://github.com/apache/seatunnel/issues/12461


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improve][CLI] Install the source setup into a project virtual environment [seatunnel]

Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #12461:
URL: https://github.com/apache/seatunnel/issues/12461#issuecomment-5806717674

   Thanks for the detailed proposal; moving the source install into `seatunnel-cli/.venv` and handling the `build_editable` failure both sound reasonable, and the `.venv` directory being in `.gitignore` already helps.
   
   A few things to keep in mind for the PR:
   
   - Keep `setup.sh` idempotent: re-running it with an existing, working `.venv` should reuse it rather than recreate it, as you describe.
   - Make sure the `virtualenv` fallback removes the partial directory before retrying, and that the final error message names the missing package when neither `python3 -m venv` nor `virtualenv` works.
   - Please update the `seatunnel-cli` docs to mention `source .venv/bin/activate` (or calling `.venv/bin/seatunnel` directly) so users do not expect `seatunnel` to be on `PATH` right after `setup.sh` finishes.
   
   One question: would you consider letting callers point the script at an environment they have already selected, so CI or users with their own setup are not forced into `.venv`? If you prefer to keep the first PR minimal, a follow-up is fine too.
   
   Looking forward to the PR!
   
   <!-- streview-comment:1278 -->


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org