Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
bugfix: allow create env with no-pip #1430
This PR fixes a bug introduced since version 16.7.0 where creating a python virtualenv with only the
Traceback (most recent call last): File "./virtualenv.py", line 2630, in <module> main() File "./virtualenv.py", line 870, in main symlink=options.symlink, File "./virtualenv.py", line 1175, in create_environment install_wheel(to_install, py_executable, search_dirs, download=download) File "./virtualenv.py", line 1019, in install_wheel _install_wheel_with_search_dir(download, project_names, py_executable, search_dirs) File "./virtualenv.py", line 1090, in _install_wheel_with_search_dir at = project_names.index("pip") ValueError: 'pip' is not in list
Recent introduction of pinning the pip version to "<19.2" in order to support deprecated python 3.4 introduces this bug.
if sys.version_info[0:2] == (3, 4): at = project_names.index("pip") project_names[at] = "pip<19.2"
The tests did not pick this up since all to_install projects where excluded with the arguments
which does not follow the following codepath
if to_install: install_wheel(to_install, py_executable, search_dirs, download=download)