Skip to content

Commit

Permalink
Remove setup.py link after successful _undo_develop
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 1, 2023
1 parent c8995e3 commit 22348e9
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 @@ -198,6 +198,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)

Check warning on line 202 in colcon_core/task/python/build.py

View check run for this annotation

Codecov / codecov/patch

colcon_core/task/python/build.py#L202

Added line #L202 was not covered by tests
return completed.returncode

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

0 comments on commit 22348e9

Please sign in to comment.