Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add EXHORT_PYTHON_INSTALL_BEST_EFFORTS functionality #65

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

zvigrinberg
Copy link
Collaborator

for virtual environment feature

Description And Background

For cases that EXHORT_PYTHON_VIRTUAL_ENV= true, if the version of a certain package in requirements.txt manifest is not suitable for the client python version, then this might results in error when trying to install.
In order to mitigate it and let the user overcome it , a new flag is introduced, EXHORT_PYTHON_INSTALL_BEST_EFFORTS.
it will be relevant and accessed only for EXHORT_PYTHON_VIRTUAL_ENV= true, otherwise, it won't even get referenced.

functionality behavior:

After creating or using the existing virtual environment , the logic will be as follows:

  1. if EXHORT_PYTHON_INSTALL_BEST_EFFORTS = false, then old logic will take place, will try to install the requirements.txt as is in the virtual environment , with the declared versions.
  2. if EXHORT_PYTHON_INSTALL_BEST_EFFORTS = true, then it will check if determined setting MATCH_MANIFEST_VERSIONS = true, if so, it will throw an error as these both settings' values are conflicting together.
    for MATCH_MANIFEST_VERSIONS = false, it will try its best efforts to install each one of the packages without specifying the version, that way, it will try to install it implicitly , and let python' pip to install the version tailored for this python version ( for each package being installed).

Checklist

  • I have followed this repository's contributing guidelines.
  • I will adhere to the project's code of conduct.

@zvigrinberg zvigrinberg merged commit 20dd654 into main Oct 25, 2023
5 checks passed
@zvigrinberg zvigrinberg deleted the feature/python-install-best-efforts branch October 25, 2023 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant