From f9bad34931e61cf49904c5df49f7af8db0fb6178 Mon Sep 17 00:00:00 2001 From: Unrud Date: Mon, 18 Apr 2022 23:44:35 +0200 Subject: Search web_data independent of working directory --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 2c8c88a..9e1f51a 100755 --- a/setup.py +++ b/setup.py @@ -6,11 +6,11 @@ from setuptools import setup VERSION = "3.1.1" -os.chdir("radicale_infcloud") -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) +package_path = os.path.join(os.path.dirname(__file__), "radicale_infcloud") +web_data = sum(( + [os.path.relpath(os.path.join(root, f), package_path) + for f in files if not f.startswith(".") and not f.endswith("~")] + for root, _, files in os.walk(os.path.join(package_path, "web"))), []) setup( name="Radicale_InfCloud", -- cgit