1 Star 0 Fork 28

markeryang / python-setuptools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
create-site-packages.patch 677 Bytes
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 11:15 . Package init
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 91c48b3..0c9b0f4 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -446,6 +446,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
1
https://gitee.com/markeryang/python-setuptools.git
git@gitee.com:markeryang/python-setuptools.git
markeryang
python-setuptools
python-setuptools
master

搜索帮助