aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnrud <unrud@openaliasbox.org>2017-07-27 19:08:39 +0200
committerUnrud <unrud@openaliasbox.org>2017-07-27 19:08:39 +0200
commit972757bf4c6be8b966ee063e3741ced29ba8169f (patch)
tree9e5b70a6a359ea71f086ffa19c21a043efcb9bba
parentUpdate ReadMe (diff)
downloadradicaleinfcloud-972757bf4c6be8b966ee063e3741ced29ba8169f.tar.gz
radicaleinfcloud-972757bf4c6be8b966ee063e3741ced29ba8169f.tar.bz2
radicaleinfcloud-972757bf4c6be8b966ee063e3741ced29ba8169f.zip
Use os.walk instead of glob (fixes #2)
-rwxr-xr-xsetup.py5
1 files 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(
bgstack15