diff options
author | Claudiu Popa <devnull@localhost> | 2014-09-30 21:15:47 +0300 |
---|---|---|
committer | Claudiu Popa <devnull@localhost> | 2014-09-30 21:15:47 +0300 |
commit | 4cdb6dff55ba47431593c7e2108a7c628bd57cd6 (patch) | |
tree | fae4dbbef94ab2a2b7a45f669639f1ab9637b8b3 /setup.py | |
parent | 398ea2141c8e0f95c8d90f1181143fa2a1fab788 (diff) | |
download | pylint-4cdb6dff55ba47431593c7e2108a7c628bd57cd6.tar.gz |
Use ignore parameter for shutil.copytree in setup.py.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -127,14 +127,8 @@ class MyInstallLib(install_lib.install_lib): else: exclude = set() shutil.rmtree(dest, ignore_errors=True) - shutil.copytree(directory, dest) - # since python2.5's copytree doesn't support the ignore - # parameter, the following loop to remove the exclude set - # was added - for (dirpath, _, filenames) in os.walk(dest): - for n in filenames: - if n in exclude: - os.remove(os.path.join(dirpath, n)) + shutil.copytree(directory, dest, + ignore=shutil.ignore_patterns(*exclude)) if sys.version_info >= (3, 0): # process manually python file in include_dirs (test data) # pylint: disable=no-name-in-module |