aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources
diff options
context:
space:
mode:
authorPaul Ganssle <pganssle@users.noreply.github.com>2018-07-20 12:11:53 -0400
committerGitHub <noreply@github.com>2018-07-20 12:11:53 -0400
commit5f510913b151998555034f70db0ceecc1e3a53b8 (patch)
treeff5d66caa52e8804536960532ec480a16905903b /pkg_resources
parentb48d4900233169c1143adfdd64aa00230ae13f26 (diff)
parent6e9ea31599c05df83501669def725b9e92b5b033 (diff)
downloadexternal_python_setuptools-5f510913b151998555034f70db0ceecc1e3a53b8.tar.gz
external_python_setuptools-5f510913b151998555034f70db0ceecc1e3a53b8.tar.bz2
external_python_setuptools-5f510913b151998555034f70db0ceecc1e3a53b8.zip
Merge pull request #1416 from pganssle/use_six
Switch over to using six.PY{2,3} when possible
Diffstat (limited to 'pkg_resources')
-rw-r--r--pkg_resources/py31compat.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py
index fd4b6fd0..a381c424 100644
--- a/pkg_resources/py31compat.py
+++ b/pkg_resources/py31compat.py
@@ -2,6 +2,8 @@ import os
import errno
import sys
+from .extern import six
+
def _makedirs_31(path, exist_ok=False):
try:
@@ -15,7 +17,7 @@ def _makedirs_31(path, exist_ok=False):
# and exists_ok considerations are disentangled.
# See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663
needs_makedirs = (
- sys.version_info.major == 2 or
+ six.PY2 or
(3, 4) <= sys.version_info < (3, 4, 1)
)
makedirs = _makedirs_31 if needs_makedirs else os.makedirs