Skip to content

Commit abe8308

Browse files
authored
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 <reinecke.eric@gmail.com>
1 parent 82068e3 commit abe8308

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

setup.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,13 @@ class OTIO_build_py(setuptools.command.build_py.build_py):
264264
def run(self):
265265
super().run()
266266

267-
if not self.dry_run and not self.editable_mode:
267+
# editable_mode isn't always present
268+
try:
269+
editable_mode = self.editable_mode
270+
except AttributeError:
271+
editable_mode = False
272+
273+
if not self.dry_run and not editable_mode:
268274
# Only run when not in dry-mode (a dry run should not have any side effect)
269275
# and in non-editable mode. We don't want to edit files when in editable
270276
# mode because that could lead to modifications to the source files.

0 commit comments

Comments
 (0)