Skip to content

Commit

Permalink
fix: update pip upgrade command (#825)
Browse files Browse the repository at this point in the history
The new command is taken from the official pip documentation:
https://pip.pypa.io/en/stable/cli/pip_install/#examples.
Example number 3.

Closes #821
  • Loading branch information
artemrys authored Sep 6, 2023
1 parent 58b629f commit b439296
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion splunk_add_on_ucc_framework/install_python_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def install_libraries(
"""

pip_version = "23.1.2"
pip_update_command = f"{installer} -m pip install pip --upgrade pip=={pip_version}"
pip_update_command = f"{installer} -m pip install --upgrade pip=={pip_version}"
pip_install_command = (
f"{installer} "
f"-m pip "
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_install_python_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_install_libraries(mock_subprocess_call):
'--use-deprecated=legacy-resolver --target "'
'/path/to/output/addon_name/lib"'
)
expected_pip_update_command = "python3 -m pip install pip --upgrade pip==23.1.2"
expected_pip_update_command = "python3 -m pip install --upgrade pip==23.1.2"
mock_subprocess_call.assert_has_calls(
[
mock.call(expected_pip_update_command, shell=True),
Expand Down

0 comments on commit b439296

Please sign in to comment.