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

neuvector-manager - use python3.XX rather than python3 to build venv #28955

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smoser
Copy link
Contributor

@smoser smoser commented Sep 19, 2024

This is convoluted, but if you use 'python3 -m venv' to build a venv then the venv's bin/python will point to 'python3' which will point to /usr/bin/python3. But melange SCA does not recognize 'python3' for a shebang dep (because it is a symlink).

So... the change here is to use python3.XX (currently 3.12).

That will get the venv built with 'python3' pointing to 'python3.12' and 'python3.12' pointing to /usr/bin/python3.12. Melange will correctly identify that this package depends on python3.12.

There is still coming breakage as the other dependencies 'py3-urllib3' are not versioned, so at some point they will move to be python3.13. At that point this package will not have 'urllib' to use.

This change does make the test pass and better to know that you use python3.12 then just assume any old python3 will work (it won't, because only one of them has the libraries installed)

This is convoluted, but if you use 'python3 -m venv' to build a venv
then the venv's bin/python will point to 'python3' which will point
to /usr/bin/python3.  But melange SCA does not recognize 'python3'
for a shebang dep (because it is a symlink).

So... the change here is to use python3.XX (currently 3.12).

That will get the venv built with 'python3' pointing to 'python3.12'
and 'python3.12' pointing to /usr/bin/python3.12.  Melange will
correctly identify that this package depends on python3.12.

There is still coming breakage as the other dependencies 'py3-urllib3'
are not versioned, so at some point they will move to be python3.13.
At that point this package will not have 'urllib' to use.

This change does make the test pass and better to know that you use
python3.12 then just assume any old python3 will work (it won't,
because only one of them has the libraries installed)
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