From 4cca5930718c7584cde02a392c55e26c79342aee Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 8 Feb 2014 00:44:47 +0100 Subject: [PATCH] do not package .swp files (fixes #269) Signed-off-by: Nico Schottelius --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index 32d734b8..c484a269 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ from distutils.core import setup import cdist import os +import re def data_finder(data_dir): entries = [] @@ -10,6 +11,11 @@ def data_finder(data_dir): if name == ".gitignore": continue + # Skip vim swp files + swpfile = re.search(r'^\..*\.swp$', name) + if swpfile: + continue + entry = os.path.join(data_dir, name) if os.path.isdir(entry): entries.extend(data_finder(entry))