diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-03-21 05:14:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-21 05:14:22 -0400 |
commit | 42d0d0393e3e8b48cbf4ff2aa5b9de09041e915f (patch) | |
tree | 1817110e43c68da6312bfbd7f5c8de543fc6b822 /setuptools | |
parent | 060445bfb557a1d0f6b726716dafa6bacaa44c34 (diff) | |
parent | a3e1afead418ae25119bf19a587d9696c27beb9a (diff) | |
download | external_python_setuptools-42d0d0393e3e8b48cbf4ff2aa5b9de09041e915f.tar.gz external_python_setuptools-42d0d0393e3e8b48cbf4ff2aa5b9de09041e915f.tar.bz2 external_python_setuptools-42d0d0393e3e8b48cbf4ff2aa5b9de09041e915f.zip |
Merge pull request #1431 from hroncok/fedora-makedirs
Make install directory if it doesn't exist yet
Diffstat (limited to 'setuptools')
-rw-r--r-- | setuptools/command/easy_install.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index abca1ae1..64ff0457 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -460,6 +460,12 @@ class easy_install(Command): instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir, 'easy-install.pth') + if not os.path.exists(instdir): + try: + os.makedirs(instdir) + except (OSError, IOError): + self.cant_write_to_target() + # Is it a configured, PYTHONPATH, implicit, or explicit site dir? is_site_dir = instdir in self.all_site_dirs |