summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrlacko <none@none>2013-02-19 09:16:13 +0100
committerrlacko <none@none>2013-02-19 09:16:13 +0100
commit86a22eb827e436ff4648552d4b6922c2c08b573a (patch)
treeb0ae4398246206ccf77f933fc687cb9faa83a2f4
parent7e2bae18571ec5b6e7df9cade381da605ebbac55 (diff)
downloadpython-setuptools-git-86a22eb827e436ff4648552d4b6922c2c08b573a.tar.gz
Fix for PermissionError when installing on Python 3.3: __pycache__ dir inside distutils scripts metadata directory
--HG-- branch : distribute extra : rebase_source : e6761715dec0e43a90b54c26f25fa68d97c97938
-rw-r--r--CHANGES.txt7
-rwxr-xr-xsetuptools/command/easy_install.py3
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index cae946e0..479850a7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,13 @@
CHANGES
=======
+------------
+Next version
+------------
+
+- Fix for distutils scripts installation on Python 3, related to
+ ``__pycache__`` directories.
+
------
0.6.35
------
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 0d72f758..ba98fa13 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -522,6 +522,9 @@ Please make the appropriate changes for your system and try again.
"""Write all the scripts for `dist`, unless scripts are excluded"""
if not self.exclude_scripts and dist.metadata_isdir('scripts'):
for script_name in dist.metadata_listdir('scripts'):
+ if dist.metadata_isdir('scripts/' + script_name):
+ # Probably Python 3 __pycache__ directory.
+ continue
self.install_script(
dist, script_name,
dist.get_metadata('scripts/'+script_name)