Closed aWZHY0yQH81uOYvH closed 8 months ago
I'm not sure this sounds like a viable solution. For example do I never use system include paths to build or install openEMS and dependencies.
For example my default build command on Linux (and similar on Windows) looks like this:
python setup.py build_ext -I/home/<username>/opt/include -L/home/<username>/opt/lib -R/home/<username>/opt/lib
In other words I always reference the full path to all includes and library locations. I would recommend doing something similar on macOS?
This is btw also what I recommend in the readme inside the python folder
Perhaps then there should be a small change to the docs indicating that the "extended options" method may still need to be used even when everything is installed in /usr/local
.
Additionally, on ARM64 macOS, I believe Homebrew installs stuff in /opt/Homebrew
which may cause the same issue even if the default system include paths are not overwritten by the python environment.
I suppose all this would be resolved by using update_openEMS.sh
but Homebrew is still the preferred option for macOS users.
Since this problem is mainly centered around Homebrew/macOS, should it get its own special snowflake documentation section? Or if the python install process is going to be inextricably linked (via the install path) to the main build process, which happens inside Homebrew, perhaps the brew formula should be updated to include the python installation (probably a good idea anyways)? Thoughts @biergaizi?
Adding the python bindings to the Homebrew formula to short circuit this entire problem looks pretty trivial: https://docs.brew.sh/Python-for-Formula-Authors#installing-bindings
Personally I would prefer a solution in which the homebrew formula would solve this. This is exactly what the update_openEMS.sh does for building from source on Linux as well...
I agree. I'll put together a small PR soon to add the python bindings as an option in the Homebrew formula.
I apologize for being a bit naive about focusing on the default include paths since that was the difference between working and not for me.
Certain python distributions (namely the one provided by Homebrew on macOS) do not provide the system include paths when building the python bindings, resulting in build failure.
See https://github.com/thliebig/openEMS-Project/discussions/167#discussioncomment-7903125 for more details.
Possible fixes
Also https://github.com/thliebig/CSXCAD/issues/38