-
Notifications
You must be signed in to change notification settings - Fork 20
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
Adding Python venv #78
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really using a pip virtual environment? It looks like the problem is fixed, by installing a separate python installation which prevents the system python installation from being polluted - which might be a workable solution.
That the fix works is obvious. Just want to have a common understanding here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess you are right - as I understand it installs Python and adds it to path. It does not in itself initiate/activate a virtual environment. Setup-python has however some support for caching so in one way I think it may reuse certain parts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some other repos like https://github.com/eclipse-kuksa/kuksa-python-sdk/blob/main/.github/workflows/dash.yaml we actually use a virtual environment. From practical perspectives I generally do no think that the difference will be that big as we typically do not need multiple different Python environments in the same workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. But caching seems to be disabled in our case, because from what I understand it needs to be explicitely enabled by using:
see: https://github.com/actions/setup-python?tab=readme-ov-file#caching-packages-dependencies
Again, not telling here that we have to use a cache or not use cache (both will solve problems and create others), just pointing out things :)
I implemented that stuff based on some commands which were provided to me, so take it with a grain of salt :D It's probably still not the best way to handle that stuff. However in that case it was mandatory to have a clean / unpolluted python instance because otherwise we would point out libraries which are required by the system as libraries used by our software.
Personally I'm fine with the approach used here. As said, I just wanted to have a common understanding. The Commit Title somehow suggests that we use a venv and maybe even what we have now is called a venv - I'm no Python expert here. I was just directly thinking about the pip venv thingy and was somehow missing in my head and in this commit where it's activated :)