{"action":"opened","issue":{"url":"https://api.github.com/repos/pypa/virtualenv/issues/767","labels_url":"https://api.github.com/repos/pypa/virtualenv/issues/767/labels{/name}","comments_url":"https://api.github.com/repos/pypa/virtualenv/issues/767/comments","events_url":"https://api.github.com/repos/pypa/virtualenv/issues/767/events","html_url":"https://github.com/pypa/virtualenv/issues/767","id":84770530,"number":767,"title":"Result of create_bootstrap_script fails without virtualenv","user":{"login":"asottile","id":1810591,"avatar_url":"https://avatars.githubusercontent.com/u/1810591?v=3","gravatar_id":"","url":"https://api.github.com/users/asottile","html_url":"https://github.com/asottile","followers_url":"https://api.github.com/users/asottile/followers","following_url":"https://api.github.com/users/asottile/following{/other_user}","gists_url":"https://api.github.com/users/asottile/gists{/gist_id}","starred_url":"https://api.github.com/users/asottile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asottile/subscriptions","organizations_url":"https://api.github.com/users/asottile/orgs","repos_url":"https://api.github.com/users/asottile/repos","events_url":"https://api.github.com/users/asottile/events{/privacy}","received_events_url":"https://api.github.com/users/asottile/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-03T21:02:56Z","updated_at":"2015-06-03T21:02:56Z","closed_at":null,"body":"Here's the simplest reproduction I could come up with (the actual case is slightly more complicated in https://github.com/pre-commit/pre-commit.github.io/issues/52)\r\n\r\n```python\r\n# make.py\r\nimport io\r\nimport virtualenv\r\n\r\nwith io.open('f.py', 'w') as f:\r\n    f.write(virtualenv.create_bootstrap_script(\r\n        'def adjust_options(options, args):\\n'\r\n        '    args[:] = [\"venv-bootstrapped\"]\\n',\r\n    ))\r\n```\r\n\r\n```sh\r\n# test.sh\r\nset -ex\r\n\r\nvirtualenv --version\r\nvirtualenv venv >& /dev/null\r\n. venv/bin/activate\r\npip install virtualenv >& /dev/null\r\npython make.py\r\n# Verify the script works when virtualenv is installed\r\npython f.py\r\n# Cool\r\nrm -rf venv-bootstrapped\r\npip uninstall -y virtualenv\r\n# Womp\r\npython f.py\r\n```\r\n\r\nRuntime:\r\n```\r\nroot@042dbf41e80c:/build# ./test.sh\r\n++ virtualenv --version\r\n13.0.3\r\n++ virtualenv venv\r\n++ . venv/bin/activate\r\n+++ deactivate nondestructive\r\n+++ unset pydoc\r\n+++ '[' -n '' ']'\r\n+++ '[' -n '' ']'\r\n+++ '[' -n /bin/bash -o -n '' ']'\r\n+++ hash -r\r\n+++ '[' -n '' ']'\r\n+++ unset VIRTUAL_ENV\r\n+++ '[' '!' nondestructive = nondestructive ']'\r\n+++ VIRTUAL_ENV=/build/venv\r\n+++ export VIRTUAL_ENV\r\n+++ _OLD_VIRTUAL_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\r\n+++ PATH=/build/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\r\n+++ export PATH\r\n+++ '[' -n '' ']'\r\n+++ '[' -z '' ']'\r\n+++ _OLD_VIRTUAL_PS1=\r\n+++ '[' x '!=' x ']'\r\n++++ basename /build/venv\r\n+++ '[' venv = __ ']'\r\n++++ basename /build/venv\r\n+++ PS1='(venv)'\r\n+++ export PS1\r\n+++ alias 'pydoc=python -m pydoc'\r\n+++ '[' -n /bin/bash -o -n '' ']'\r\n+++ hash -r\r\n++ pip install virtualenv\r\n++ python make.py\r\n++ python f.py\r\nUsing real prefix '/usr'\r\nNew python executable in venv-bootstrapped/bin/python\r\nInstalling setuptools, pip, wheel...done.\r\n++ rm -rf venv-bootstrapped\r\n++ pip uninstall -y virtualenv\r\nUninstalling virtualenv-13.0.3:\r\n  Successfully uninstalled virtualenv-13.0.3\r\n++ python f.py\r\nUsing real prefix '/usr'\r\nNew python executable in venv-bootstrapped/bin/python\r\nCannot find a wheel for setuptools\r\nCannot find a wheel for pip\r\nInstalling setuptools, pip, wheel...\r\n  Complete output from command /build/venv-bootstrapped/bin/python -c \"import sys, pip; sys...d\\\"] + sys.argv[1:]))\" setuptools pip wheel:\r\n  Traceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\nImportError: No module named pip\r\n----------------------------------------\r\n...Installing setuptools, pip, wheel...done.\r\nTraceback (most recent call last):\r\n  File \"f.py\", line 2367, in <module>\r\n    main()\r\n  File \"f.py\", line 834, in main\r\n    symlink=options.symlink)\r\n  File \"f.py\", line 1006, in create_environment\r\n    install_wheel(to_install, py_executable, search_dirs)\r\n  File \"f.py\", line 971, in install_wheel\r\n    'PIP_NO_INDEX': '1'\r\n  File \"f.py\", line 912, in call_subprocess\r\n    % (cmd_desc, proc.returncode))\r\nOSError: Command /build/venv-bootstrapped/bin/python -c \"import sys, pip; sys...d\\\"] + sys.argv[1:]))\" setuptools pip wheel failed with error code 1\r\n```"}}