Skip to content

Commit

Permalink
Fixed AttributeError: editable_mode in setup.py (#1715)
Browse files Browse the repository at this point in the history
* Added fallback for when the editable_mode attribute isn't present in setup.py

---------

Signed-off-by: Eric Reinecke <reinecke.eric@gmail.com>
  • Loading branch information
reinecke authored Mar 30, 2024
1 parent 82068e3 commit abe8308
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit abe8308

Please sign in to comment.