From 972757bf4c6be8b966ee063e3741ced29ba8169f Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 27 Jul 2017 19:08:39 +0200 Subject: Use os.walk instead of glob (fixes #2) --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 175d323..968faa1 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -import glob import os import re @@ -11,7 +10,9 @@ init_path = os.path.join(os.path.dirname(__file__), with open(init_path) as f: version = re.search(r'VERSION = "([^"]+)"', f.read()).group(1) os.chdir("radicale_infcloud") -web_data = list(filter(os.path.isfile, glob.glob("web/**/*[!~]", recursive=True))) +web_data = sum(([os.path.join(root, f) for f in files + if not f.startswith(".") and not f.endswith("~")] + for root, _, files in os.walk("web")), []) os.chdir(os.pardir) setup( -- cgit