Skip to content

Commit

Permalink
Merge pull request #448 from rd4398/issue-447
Browse files Browse the repository at this point in the history
Create build log file before post build hook
  • Loading branch information
mergify[bot] authored Sep 26, 2024
2 parents 1cdaffc + 3879380 commit b815993
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/fromager/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ def _build(
build_env=build_env,
)

per_wheel_logger.removeHandler(file_handler)
file_handler.close()

new_filename = wheel_log.with_name(wheel_filename.stem + ".log")
wheel_log.rename(new_filename)

hooks.run_post_build_hooks(
ctx=wkctx,
req=req,
Expand All @@ -342,12 +348,6 @@ def _build(
wheel_filename=wheel_filename,
)

per_wheel_logger.removeHandler(file_handler)
file_handler.close()

new_filename = wheel_log.with_name(wheel_filename.stem + ".log")
wheel_log.rename(new_filename)

return wheel_filename


Expand Down

0 comments on commit b815993

Please sign in to comment.