From 8aebf4819355372e4392b3aa137037339ce43394 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 8 Feb 2021 19:28:56 +0100 Subject: [PATCH] Update handling for package data --- cps/updater.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cps/updater.py b/cps/updater.py index 4d5117a9..5ef060ef 100644 --- a/cps/updater.py +++ b/cps/updater.py @@ -232,6 +232,11 @@ class Updater(threading.Thread): additional_path = self.is_venv() if additional_path: exclude = exclude + (additional_path,) + + # check if we are in a package, rename cps.py to __init__.py + if constants.HOME_CONFIG: + shutil.move(os.path.join(source, 'cps.py'), os.path.join(source, '__init__.py')) + for root, dirs, files in os.walk(destination, topdown=True): for name in files: old_list.append(os.path.join(root, name).replace(destination, ''))