From f71138a9a72971f19a786c13adbf2695277d4d3f Mon Sep 17 00:00:00 2001 From: Jonathan Peirce Date: Fri, 5 Jul 2024 13:47:06 +0100 Subject: [PATCH] FF: plugins syntax error after merge of release --- psychopy/plugins/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/psychopy/plugins/__init__.py b/psychopy/plugins/__init__.py index 9ff86145e8..b56473360f 100644 --- a/psychopy/plugins/__init__.py +++ b/psychopy/plugins/__init__.py @@ -40,13 +40,11 @@ USER_PACKAGES_PATH = None # check if we're in a virtual environment or not -inVM = hasattr(sys, 'real_prefix') or sys.prefix != sys.base_prefix +inVenv = hasattr(sys, 'real_prefix') or sys.prefix != sys.base_prefix - # add the plugins folder to the path - # if USER_PACKAGES_PATH not in sys.path: - # sys.path.insert(0, USER_PACKAGES_PATH) # add to path - if not site.ENABLE_USER_SITE or USER_PACKAGES_PATH not in sys.path: - site.addsitedir(USER_PACKAGES_PATH) +# add the plugins folder to the path +if not inVenv and USER_PACKAGES_PATH not in sys.path: + sys.path.insert(0, USER_PACKAGES_PATH) # add to path # Keep track of plugins that have been loaded. Keys are plugin names and values # are their entry point mappings.