-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Doesn't work properly when Python is installed from source #35
Comments
My impression that this far outside a supported use-case but if you have some ideas on how to cover it, feel free to propose it. |
I will close this because I do not see anything actionable about it. Still if anyone else has a different idea, I am willing to reopen it. |
Hey @ssbarnea, it would be better if we could check if python is installed to an alternate root by using something like sys.base_prefix for instance which would map to that path and prevent from breaking for systems where python is installed under /opt or /usr/local as mentioned above. I could work on a PR for this if you'd like |
I was about to say, that I will always look at PRs. Make one that does not break on redhat family and I will likely approve it. I also happen to use pyenv a lot, so I should be able to provide extra feedback on it. The tricky bit here is that someone still needs to compile the real selinux for that particular python version or this extension will not work. Keep in mind that this extension is shim that allows a venv to access selinux from python. If is missing, it will not help. |
Hey @ssbarnea, looks like libselinux-python3 in it's current offering is heavily tied to the system python that redhat ships with for both 7 and 8 and also to a specific python version (3.6). As a good workaround, I could just have the system python with selinux bindings(libselinux-python) and install this extension on the built distribution (under /opt). It seems to be treating it similar to a venv and some of the ansible modules which depend on it, seem to satisfy my use cases without complicating things. Thanks for the quick response and maintaining this project. |
Hello, |
Ansible has a dependency on selinux for many core modules, make ansible work under your python interpreter and I am confident that molecule will work too. |
I just hit this issue in a real world use case. I have an Ansible Tower environment where both python2 and python3 are in use, and the default enabled is python2. I cannot enable the system python3 for general use, but when users build venvs they can point to the python3 installation location in /opt/rh/... for python3. But, we hit this problem now on upgrading the venv to a more recent version of our packages and weren't hitting any selinux requirement before. |
This issue is related to #19.
The text was updated successfully, but these errors were encountered: