From abe83087a8990b1ab9ace1c0e9cbdb2f18484103 Mon Sep 17 00:00:00 2001 From: Eric Reinecke Date: Sat, 30 Mar 2024 10:33:42 -0700 Subject: [PATCH] Fixed AttributeError: editable_mode in setup.py (#1715) * Added fallback for when the editable_mode attribute isn't present in setup.py --------- Signed-off-by: Eric Reinecke --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c3cf6c48d..a50a74d78 100644 --- a/setup.py +++ b/setup.py @@ -264,7 +264,13 @@ class OTIO_build_py(setuptools.command.build_py.build_py): def run(self): super().run() - if not self.dry_run and not self.editable_mode: + # editable_mode isn't always present + try: + editable_mode = self.editable_mode + except AttributeError: + editable_mode = False + + if not self.dry_run and not editable_mode: # Only run when not in dry-mode (a dry run should not have any side effect) # and in non-editable mode. We don't want to edit files when in editable # mode because that could lead to modifications to the source files.