New submission from Charalampos Stratakis:

The latest versions of setuptools stopped bundling its dependencies and instead 
starting requiring them [0]. This seems to break virtualenvs as those 
dependencies are not bundled with python.

In order to reproduce it, replace the setuptools-28.8.0-py2.py3-none-any.whl 
with setuptools-34.1.1-py2.py3-none-any.whl at Lib/ensurepip/_bundled/ and 
change 

_SETUPTOOLS_VERSION = "28.8.0"

to 


_SETUPTOOLS_VERSION = "34.1.1"

Then configure, make and make install:

This message will appear first:
Could not find a version that satisfies the requirement packaging>=16.8 (from 
setuptools) (from versions: )
No matching distribution found for packaging>=16.8 (from setuptools)

Which is one of the new dependencies.

Then:
./python3.7 -m test test_venv -v

Where the EnsurePipTest will fail due to this assertion [1] at the 
do_test_with_pip test case with "No module named pip\n' != ''".

One way to fix this would be to bundle the other wheels with python, not sure 
if that would be the ideal approach though.

Attaching a patch for Lib/ensurepip/__init__.py. With this patch and adding the 
other wheels [2][3][4][5] at the _bundled directory fixes the issue.

[0] https://github.com/pypa/setuptools/blob/master/CHANGES.rst#v3400
[1] https://github.com/python/cpython/blob/master/Lib/test/test_venv.py#L384
[2] https://pypi.python.org/pypi/six/1.10.0
[3] https://pypi.python.org/pypi/appdirs/1.4.0
[4] https://pypi.python.org/pypi/packaging/16.8
[5] https://pypi.python.org/pypi/pyparsing/2.1.10

----------
components: Distutils, Library (Lib)
files: bundle-setuptools-dependencies.patch
keywords: patch
messages: 287504
nosy: cstratak, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: latest setuptools breaks virtualenvs due to unbundling dependencies
versions: Python 3.6, Python 3.7
Added file: 
http://bugs.python.org/file46621/bundle-setuptools-dependencies.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29523>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to