Skip to content

pypy3.5 virtualenv does not support venv re-creation #5658

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

Closed
humitos opened this issue May 2, 2019 · 4 comments
Closed

pypy3.5 virtualenv does not support venv re-creation #5658

humitos opened this issue May 2, 2019 · 4 comments
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@humitos
Copy link
Member

humitos commented May 2, 2019

Setting Project.container_image to pypy3.5 works the first time. Although, when triggering a new build for that project and version it fails with an error saying that the file already exists.

 pypy3.5 -mvirtualenv --no-site-packages --no-download /home/humitos/rtfd/code/readthedocs.org/user_builds/test-builds/envs/pypy3.5

Outputs this error,

Using base prefix '/home/docs/.pyenv/versions/pypy3.5-7.0.0'
New pypy executable in /home/humitos/rtfd/code/readthedocs.org/user_builds/test-builds/envs/pypy3.5/bin/pypy3.5
Not overwriting existing pypy script /home/humitos/rtfd/code/readthedocs.org/user_builds/test-builds/envs/pypy3.5/bin/pypy (you must use /home/humitos/rtfd/code/readthedocs.org/user_builds/test-builds/envs/pypy3.5/bin/pypy3.5)
Traceback (most recent call last):

...

  File "/home/docs/.pyenv/versions/pypy3.5-7.0.0/site-packages/virtualenv.py", line 1653, in install_python
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/home/docs/.pyenv/versions/pypy3.5-7.0.0/lib-python/3/subprocess.py", line 592, in __init__
    _pypy_install_libs_after_virtualenv(args[0])
  File "/home/docs/.pyenv/versions/pypy3.5-7.0.0/lib-python/3/subprocess.py", line 1572, in _pypy_install_libs_after_virtualenv
    os.path.join(dest_dir, '../lib'))
  File "/home/docs/.pyenv/versions/pypy3.5-7.0.0/lib-python/3/shutil.py", line 315, in copytree
    os.makedirs(dst)
  File "/home/docs/.pyenv/versions/pypy3.5-7.0.0/lib-python/3/os.py", line 241, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/humitos/rtfd/code/readthedocs.org/user_builds/test-builds/envs/pypy3.5/bin/../lib'

Wiping the version makes it works again (or running the command with --clean option).

Related #5657

@stale
Copy link

stale bot commented Jun 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Jun 16, 2019
@humitos humitos added Accepted Accepted issue on our roadmap Bug A bug and removed Status: stale Issue will be considered inactive soon labels Jun 17, 2019
@humitos
Copy link
Member Author

humitos commented Jun 17, 2019

Our Docker images has pypy installed now and it's working for the first build. Although, if the environment it re-used pypy fails with this problem.

I think this is won't be a problem anymore since we are going to remove the environment on each build (behind a feature flag now, I think) and in the future we won't share anything.

So, this will probably automatically supported in the next months without any change. @stsewd am I right? If so, feel free to close this issue.

@stsewd
Copy link
Member

stsewd commented Jun 17, 2019

@humitos removing after build is more an experiment right now, so isn't definitive.

@humitos
Copy link
Member Author

humitos commented Aug 6, 2019

I'm closing this issue since we are not going to "solve it". Currently, it's possible to build using pypy3.5 Python version enabling the feature flag CLEAN_AFTER_BUILD into the project itself.

Take a look at this commit readthedocs/test-builds@b3632d3 that builds at https://readthedocs.org/projects/test-builds/builds/9476302/ (this is the second build triggered in a row and the whole env did not exists --was removed after the first build has finished)

@humitos humitos closed this as completed Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

No branches or pull requests

2 participants