summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2014-09-30 21:15:47 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2014-09-30 21:15:47 +0300
commit6d7cd0683a64aabceec42b4c34292ae718795a09 (patch)
tree3c49f02268613528de908490adde3e4868d926ea /setup.py
parent47b4a8176aa33207ccfc67104392459ee788ee4f (diff)
downloadpylint-git-6d7cd0683a64aabceec42b4c34292ae718795a09.tar.gz
Use ignore parameter for shutil.copytree in setup.py.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/setup.py b/setup.py
index 61fb11479..a38e9c723 100644
--- a/setup.py
+++ b/setup.py
@@ -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