diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-02 23:57:11 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-02 23:57:11 (GMT) |
commit | 7e077243095e0f91c5627f9e6e7cd395846edb46 (patch) | |
tree | 4c19cb346c4b014f5d942792a2ed1f15dfb04313 /setup.py | |
parent | e39d5d5f814756f66983b35b843bc00632a50451 (diff) | |
download | cpython-7e077243095e0f91c5627f9e6e7cd395846edb46.zip cpython-7e077243095e0f91c5627f9e6e7cd395846edb46.tar.gz cpython-7e077243095e0f91c5627f9e6e7cd395846edb46.tar.bz2 |
Merged revisions 73788 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r73788 | amaury.forgeotdarc | 2009-07-03 01:08:45 +0200 (ven., 03 juil. 2009) | 6 lines
#4601: 'make install' did not set the permissions on library directories,
only root could start IDLE for example.
Beware that os.path.walk does not translate as is to os.walk!
the former uses a callback to call on each dir, the latter is a generator...
........
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1605,12 +1605,11 @@ class PyBuildInstallLib(install_lib): def set_dir_modes(self, dirname, mode): if not self.is_chmod_supported(): return - os.walk(dirname, self.set_dir_modes_visitor, mode) - - def set_dir_modes_visitor(self, mode, dirname, names): - if os.path.islink(dirname): return - log.info("changing mode of %s to %o", dirname, mode) - if not self.dry_run: os.chmod(dirname, mode) + for dirpath, dirnames, fnames in os.walk(dirname): + if os.path.islink(dirpath): + continue + log.info("changing mode of %s to %o", dirpath, mode) + if not self.dry_run: os.chmod(dirpath, mode) def is_chmod_supported(self): return hasattr(os, 'chmod') |