Skip to content

Commit

Permalink
Remove setup.py link after successful _undo_develop (#578)
Browse files Browse the repository at this point in the history
This function reverts a previous setuptools 'develop' operation, but
doesn't actually clean up the artifacts under the build tree that it
used to determine that 'develop' was previously used. The result is that
after performing a build with --symlink-install, all subsequent builds
of that package without --symlink-install will run the commands to
"undo" the develop operation even if there is nothing to undo.

This should provide a small performance improvement under those specific
circumstances.
  • Loading branch information
cottsay committed Sep 13, 2023
1 parent 5c8c498 commit 63f95b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions colcon_core/task/python/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ async def _undo_develop(self, pkg, args, env):
]
completed = await run(
self.context, cmd, cwd=args.build_base, env=env)
if not completed.returncode:
os.remove(setup_py_build_space)
return completed.returncode

def _undo_install(self, pkg, args, setup_py_data, python_lib):
Expand Down

0 comments on commit 63f95b4

Please sign in to comment.