Skip to content

Commit

Permalink
omnibus: python: probe the build environment for CC/CXX (#32340)
Browse files Browse the repository at this point in the history
  • Loading branch information
chouquette authored Dec 18, 2024
1 parent 99d8d32 commit 0d05fdd
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 0d05fdd

Please sign in to comment.