summaryrefslogtreecommitdiff
path: root/setuptools/command/build_py.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-08-16 00:29:24 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-08-16 07:15:18 -0400
commitfb7ab81a3d080422687bad71f9ae9d36eeefbee2 (patch)
treed87a9f6fdf32ab64334e1eb8a695949a88a3b043 /setuptools/command/build_py.py
parent4eb5b32f8d8bb1e20907028a516346e2b1901391 (diff)
downloadpython-setuptools-git-fb7ab81a3d080422687bad71f9ae9d36eeefbee2.tar.gz
Remove Python 2 compatibility
Diffstat (limited to 'setuptools/command/build_py.py')
-rw-r--r--setuptools/command/build_py.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py
index 9d0288a5..4709679b 100644
--- a/setuptools/command/build_py.py
+++ b/setuptools/command/build_py.py
@@ -9,9 +9,6 @@ import distutils.errors
import itertools
import stat
-from setuptools.extern import six
-from setuptools.extern.six.moves import map, filter, filterfalse
-
try:
from setuptools.lib2to3_ex import Mixin2to3
except ImportError:
@@ -73,9 +70,6 @@ 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:
@@ -249,7 +243,7 @@ def _unique_everseen(iterable, key=None):
seen = set()
seen_add = seen.add
if key is None:
- for element in filterfalse(seen.__contains__, iterable):
+ for element in itertools.filterfalse(seen.__contains__, iterable):
seen_add(element)
yield element
else: