diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-06-03 09:49:38 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-06-03 09:49:38 -0400 |
| commit | 58b12d13d13e62fbe08ad47d10ed9e5cc6b11f25 (patch) | |
| tree | c2de1925987cdb26071b89cd0f7a98e5d37969e5 /setuptools | |
| parent | e72668091ee1b8e4358a84260ac0cf0ea06b4dea (diff) | |
| parent | 11d5bb9e47754f0f4ded5379450e83e29d3661fb (diff) | |
| download | python-setuptools-git-58b12d13d13e62fbe08ad47d10ed9e5cc6b11f25.tar.gz | |
Merge pull request #597 from benjaoming/patch-1
Ensure package name isn't unicode in Python2 distutils
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/command/build_py.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 758a3fdf..0bad8295 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -8,6 +8,7 @@ import io import distutils.errors import itertools +from setuptools.extern import six from setuptools.extern.six.moves import map, filter, filterfalse try: @@ -66,6 +67,9 @@ class build_py(orig.build_py, Mixin2to3): return orig.build_py.__getattr__(self, attr) def build_module(self, module, module_file, package): + if six.PY2 and isinstance(package, six.string_types): + # avoid errors on Python 2 when unicode is passed (#190) + package = package.split('.') outfile, copied = orig.build_py.build_module(self, module, module_file, package) if copied: |
