diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-07-13 14:13:54 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-07-13 14:13:54 -0400 |
commit | 04a306fa080e8a71f94ea5198b507c501c621cb6 (patch) | |
tree | e8cf48586c26f719302136397697ddebdbf2e9af /setuptools/command/easy_install.py | |
parent | 902edffbbab6203a9b3d765485159208fa6e68c3 (diff) | |
download | python-setuptools-git-04a306fa080e8a71f94ea5198b507c501c621cb6.tar.gz |
Use makedirs with future compatibility throughout setuptools. Ref #1083.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e319f77c..8fba7b41 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -59,7 +59,7 @@ from pkg_resources import ( Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound, VersionConflict, DEVELOP_DIST, ) -import pkg_resources +import pkg_resources.py31compat # Turn on PEP440Warnings warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) @@ -544,8 +544,7 @@ class easy_install(Command): if ok_exists: os.unlink(ok_file) dirname = os.path.dirname(ok_file) - if not os.path.exists(dirname): - os.makedirs(dirname) + pkg_resources.py31compat.makedirs(dirname, exist_ok=True) f = open(pth_file, 'w') except (OSError, IOError): self.cant_write_to_target() |