Repository: pypa/setuptools

Issue:
No module named 'six'
Flask's Tox/Travis builds all started failing. Looks like a new version of setuptools was just released that has a problem with six.

~~~pytb
Obtaining file:///home/david/Projects/flask
Installing collected packages: Flask
  Running setup.py develop for Flask
    Complete output from command /home/david/Projects/flask/.tox/py/bin/python3 -c "import setuptools, tokenize;__file__='/home/david/Projects/flask/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
    /home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/setuptools/dist.py:336: UserWarning: Normalizing '0.13-dev' to '0.13.dev0'
      normalized_version,
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/david/Projects/flask/setup.py", line 109, in <module>
        '''
      File "/usr/lib64/python3.6/distutils/core.py", line 134, in setup
        ok = dist.parse_command_line()
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/setuptools/dist.py", line 363, in parse_command_line
        result = _Distribution.parse_command_line(self)
      File "/usr/lib64/python3.6/distutils/dist.py", line 472, in parse_command_line
        args = self._parse_command_opts(parser, args)
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/setuptools/dist.py", line 674, in _parse_command_opts
        nargs = _Distribution._parse_command_opts(self, parser, args)
      File "/usr/lib64/python3.6/distutils/dist.py", line 528, in _parse_command_opts
        cmd_class = self.get_command_class(command)
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/setuptools/dist.py", line 495, in get_command_class
        self.cmdclass[command] = cmdclass = ep.load()
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2303, in load
        return self.resolve()
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2309, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/setuptools/command/develop.py", line 11, in <module>
        from setuptools.command.easy_install import easy_install
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 49, in <module>
        from setuptools.py27compat import rmtree_safe
      File "/home/david/Projects/flask/.tox/py/lib/python3.6/site-packages/setuptools/py27compat.py", line 7, in <module>
        import six
    ModuleNotFoundError: No module named 'six'
~~~

Example failed build log: https://travis-ci.org/pallets/flask/jobs/238166427#L242


Discussion:
I am seeing [a very similar traceback](https://gist.github.com/thanatos/7daa078f02a84de106d0183fbe6ea54e); these seem to correspond w/ the release of `setuptools==36`; I'm trying to repro locally to see if rolling that back fixes.

Resolving patch:
diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py
--- a/setuptools/py27compat.py
+++ b/setuptools/py27compat.py
@@ -4,7 +4,7 @@
 
 import platform
 
-import six
+from setuptools.extern import six
 
 
 def get_all_headers(message, key):


Test patch: