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

0.1.5 release was broken: deleted from PYPA #17

Closed
ssbarnea opened this issue Jul 2, 2019 · 4 comments · Fixed by #19
Closed

0.1.5 release was broken: deleted from PYPA #17

ssbarnea opened this issue Jul 2, 2019 · 4 comments · Fixed by #19
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Jul 2, 2019

As last night release proved to break jobs, I removed it from PYPI and we will need to make a new one once we fix the breaking change that caused it.

Example: http://logs.rdoproject.org/19/21319/1/check/tox-py27/37a6c77/tox/reports.html

check_output raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command '['/home/zuul/src/review.rdoproject.org/rdo-infra/ci-config/.tox/py27/bin/python', '-c', 'import json, site; print(json.dumps(site.getsitepackages()))']' returned non-zero exit status 1 ----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):   
File "<string>", line 1, in <module> AttributeError: 'module' object has no attribute 'getsitepackages' ERROR! Unexpected Exception, this is probably a bug: 
Command '['/home/zuul/src/review.rdoproject.org/rdo-infra/ci-config/.tox/py27/bin/python', '-c', 'import json, site; print(json.dumps(site.getsitepackages()))']' returned non-zero exit status 1 ERROR: Traceback (most recent call last):   
File "<string>", line 1, in <module> AttributeError: 'module' object has no attribute 'getsitepackages'
ERROR! Unexpected Exception, this is probably a bug: 
Command '['/home/zuul/src/review.rdoproject.org/rdo-infra/ci-config/.tox/py27/bin/python', '-c', 'import json, site; print(json.dumps(site.getsitepackages()))']' returned non-zero exit status 1 
@ssbarnea ssbarnea added this to the 0.1.6 milestone Jul 2, 2019
@ssbarnea ssbarnea added bug Something isn't working help wanted Extra attention is needed labels Jul 2, 2019
@ssbarnea
Copy link
Member Author

ssbarnea commented Jul 2, 2019

Apparently this is caused by pypa/virtualenv#355 which we missed to detect during testing. A fix will need to include improved testing to avoid such regression.

@reihl
Copy link

reihl commented Dec 20, 2022

I want to revisit this issue, can we return to "system_python = sys.executable" We failed to run selinux package inside the virtualenv

@joshtrutwin
Copy link

I believe I'm running into this issue when installing ansible into a pyenv:

[c080292@DLCLENG-1-0001 ansible]$ which python
~/.pyenv/shims/python
[c080292@DLCLENG-1-0001 ansible]$ pyenv which python
/home/c080292/.pyenv/versions/3.9.13/bin/python
[c080292@DLCLENG-1-0001 ansible]$ which ansible
~/.pyenv/shims/ansible
[c080292@DLCLENG-1-0001 ansible]$ ansible --version
Traceback (most recent call last):
  File "/home/c080292/.pyenv/versions/3.9.13/bin/ansible", line 5, in <module>
    from ansible.cli.adhoc import main
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/site-packages/ansible/cli/__init__.py", line 101, in <module>
    from ansible.module_utils.common.file import is_executable
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/site-packages/ansible/module_utils/common/file.py", line 25, in <module>
    import selinux
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/site-packages/selinux/__init__.py", line 106, in <module>
    check_system_sitepackages()
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/site-packages/selinux/__init__.py", line 95, in check_system_sitepackages
    system_sitepackages = get_system_sitepackages()
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/site-packages/selinux/__init__.py", line 81, in get_system_sitepackages
    subprocess.check_output(
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/c080292/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/python3.9'

I don't have /usr/bin/python3.9 on this system

My workaround has been to update .pyenv/versions/3.9.13/lib/python3.9/site-packages/selinux/init.py to point to my local python but would be nice if worked out of the box.

Thanks

@joshtrutwin
Copy link

Ah my bad, I should've put this into #69 instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants