Skip to content

Commit

Permalink
omnibus: python: probe the build environment for CC/CXX
Browse files Browse the repository at this point in the history
The current running environment doesn't have these variables set on
purpose, so we need to check inside the one that will be used for the
build commands.
This fixes a regression introduced in #32230
  • Loading branch information
chouquette committed Dec 18, 2024
1 parent 6d0ce2d commit c4157ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omnibus/config/software/python3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@

# Don't forward CC and CXX to python extensions Makefile, it's quite unlikely that any non default
# compiler we use would end up being available in the system/docker image used by customers
if linux_target? && ENV["CC"]
if linux_target? && env["CC"]
command "sed -i \"s/^CC=[[:space:]]*${CC}/CC=gcc/\" #{install_dir}/embedded/lib/python#{major}.#{minor}/config-3.12-*-linux-gnu/Makefile", :env => env
command "sed -i \"s/${CC}/gcc/g\" #{install_dir}/embedded/lib/python#{major}.#{minor}/_sysconfigdata__linux_*-linux-gnu.py", :env => env
end
if linux_target? && ENV["CXX"]
if linux_target? && env["CXX"]
command "sed -i \"s/^CXX=[[:space:]]*${CXX}/CC=g++/\" #{install_dir}/embedded/lib/python#{major}.#{minor}/config-3.12-*-linux-gnu/Makefile", :env => env
command "sed -i \"s/${CXX}/g++/g\" #{install_dir}/embedded/lib/python#{major}.#{minor}/_sysconfigdata__linux_*-linux-gnu.py", :env => env
end
Expand Down

0 comments on commit c4157ff

Please sign in to comment.