updates and fixes for findPythonDeps script#4682
Merged
boegel merged 2 commits intoeasybuilders:developfrom Nov 6, 2024
Merged
updates and fixes for findPythonDeps script#4682boegel merged 2 commits intoeasybuilders:developfrom
boegel merged 2 commits intoeasybuilders:developfrom
Conversation
0f5d9fa to
d81cb35
Compare
- Require Python 3.3 - Add/update documentation - Use f-strings for formatted output - Fix detecting packages where the name might appear as the "key" not the "package_name" - Set PYTHONNOUSERSITE - Use venv module instead of virtualenv to require less packages
d81cb35 to
b01a52b
Compare
Contributor
Typo (given that you use f-strings, so it would be python3.6 at least)? |
92b7477 to
b01a52b
Compare
Contributor
Author
Yes, wasn't aware that f-strings were so late. Also the change from virtualenv to venv wasn't complete. The script will (also) be run with a loaded Python module. So after this change it can no longer be used to find packages for Python 2 or < 3.6. That is 2018b for Python2 and 2016b for Python 3.5. I'd say this is fine as there is likely no one adding ECs for those. |
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.
I noticed that the script failed to detect e.g.
jupyter-corebecause thepackage_nameentry isjupyter_core. However that isn't consistent:I fixed that and used the opportunity to generally do some updates. In total:
3.33.6 (due to f-strings andsubprocess.DEVNULL[3.3])This should make the script more robust and easier to understand and maintain. Especially the description at the top should be very helpful for those that don't know it yet.
I used PyLint to check the script. In one place there was an unused argument that should have been used but wasn't. Putting the "main" code into a function allowed to detect that as there are no more global variables.