do not package .swp files (fixes #269)

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-02-08 00:44:47 +01:00
parent 77df0ae324
commit 4cca593071

View file

@ -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))