Added script to install confluent_kafka module and do a sanity test with multiple python versions.#1743
Open
Added script to install confluent_kafka module and do a sanity test with multiple python versions.#1743
Conversation
…ith multiple python versions.
anchitj
suggested changes
Jun 20, 2024
Comment on lines
28
to
46
| echo Installing python $version | ||
| pyenv install -s $version > /dev/null 2>&1 | ||
|
|
||
| echo Using $version | ||
| pyenv shell $version > /dev/null 2>&1 | ||
|
|
||
| echo Python version: `python -V` | ||
| echo Pip version: `pip -V` | ||
|
|
||
| echo "Uninstalling confluent_kafka if already installed" | ||
| pip uninstall -y confluent_kafka > /dev/null 2>&1 || true | ||
|
|
||
| if [ "$2" = "test" ]; then | ||
| echo "Installing confluent_kafka from test PyPI" | ||
| pip install --index-url https://test.pypi.org/simple/ confluent_kafka==$1 > /dev/null 2>&1 | ||
| else | ||
| echo "Installing confluent_kafka" | ||
| pip install confluent_kafka==$1 > /dev/null 2>&1 | ||
| fi |
Contributor
There was a problem hiding this comment.
Any reason we are redirecting to /dev/null for all the commands? It can be removed for better debugging.
| echo "Please provide a version of confluent_kafka to install." | ||
| exit 1 | ||
| fi | ||
|
|
Contributor
There was a problem hiding this comment.
We should move $1 and $2 to params for better readability and use them instead
CONFLUENT_KAFKA_VERSION=$1
USE_TEST_PYPI=$2
| echo Pip version: `pip -V` | ||
|
|
||
| echo "Uninstalling confluent_kafka if already installed" | ||
| pip uninstall -y confluent_kafka > /dev/null 2>&1 || true |
Contributor
There was a problem hiding this comment.
Should we add venv here to not make changes in the global space?
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.