diff --git a/Formula/freecad@0.20.2_py310.rb b/Formula/freecad@0.20.2_py310.rb index 31e8a738..58e15d0c 100644 --- a/Formula/freecad@0.20.2_py310.rb +++ b/Formula/freecad@0.20.2_py310.rb @@ -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["python@3.10"].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"]}" @@ -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["python@3.12"].opt_prefix/"bin" # ENV.remove "PATH", Formula["python@3.12"].opt_prefix/"libexec/bin" # ENV.remove "PKG_CONFIG_PATH", Formula["python@3.12"].opt_prefix/"lib/pkgconfig" - # NOTE: ipatch, required for successful build - # ENV.prepend_path "PYTHONPATH", Formula["shiboken2@5.15.5"].opt_prefix/Language::Python.site_packages(python3) - # ENV.prepend_path "PYTHONPATH", Formula["pyside2@5.15.5"].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