Skip to content

Commit

Permalink
[email protected]_py310 update formula to build on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ipatch committed May 25, 2024
1 parent 7d13893 commit 3f6ce12
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Formula/[email protected]_py310.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,18 @@ def install
#
# NOTE: `which` cmd is not installed by default on some OSes
# ENV["PYTHON"] = which("python3.10")
#
# Get the Python includes directory without duplicates
ENV["PYTHON"] = Formula["[email protected]"].opt_bin/"python3.10"

# Get the Python includes directory without duplicates
py_inc_output = `python3.10-config --includes`
py_inc_dirs = py_inc_output.scan(/-I([^\s]+)/).flatten.uniq
py_inc_dir = py_inc_dirs.join(" ")

py_lib_path = `python3.10-config --configdir`.strip + "/libpython3.10.dylib"
py_lib_path = if OS.mac?
`python3.10-config --configdir`.strip + "/libpython3.10.dylib"
else
`python3.10-config --configdir`.strip + "/libpython3.10.a"
end

puts "--------------------------------------------"
puts "PYTHON=#{ENV["PYTHON"]}"
Expand Down Expand Up @@ -282,15 +285,11 @@ def install

ENV.remove "CMAKE_FRAMEWORK_PATH", Formula["qt"].opt_prefix/"Frameworks"

# TODO: ipatch, causes audit exception, ie. `brew style freecad/freecad`
# TODO: ipatch, below cause audit exceptions, ie. `brew style freecad/freecad`
# ENV.remove "PATH", Formula["[email protected]"].opt_prefix/"bin"
# ENV.remove "PATH", Formula["[email protected]"].opt_prefix/"libexec/bin"
# ENV.remove "PKG_CONFIG_PATH", Formula["[email protected]"].opt_prefix/"lib/pkgconfig"

# NOTE: ipatch, required for successful build
# ENV.prepend_path "PYTHONPATH", Formula["[email protected]"].opt_prefix/Language::Python.site_packages(python3)
# ENV.prepend_path "PYTHONPATH", Formula["[email protected]"].opt_prefix/Language::Python.site_packages(python3)

# NOTE: ipatch, do not make build dir a sub dir of the src dir
puts "current working directory: #{Dir.pwd}"
src_dir = Dir.pwd.to_s
Expand Down

0 comments on commit 3f6ce12

Please sign in to comment.