IfcOpenShell / IfcOpenShell

Open source IFC library and geometry engine
GNU Lesser General Public License v3.0
1.73k stars 697 forks source link

FindPython #4980

Open aothms opened 1 week ago

aothms commented 1 week ago

Hi @Andrej730 Thanks for working on modernizing our cmake scripts in https://github.com/IfcOpenShell/IfcOpenShell/commit/4211e7a936c5571af5602f9fff94282990ff8e94 But this change seemed to have broken the openbot builds.

There are quite a few specific uses of finding python in the nix build script [0] (windows fails to detect as well, but usage there is simpler).

https://github.com/IfcOpenShell/IfcOpenShell/blob/74e27a27b598c1264b9851f2687135d6da932a42/nix/build-all.py#L978-L1007

I'm wondering if I can revert this commit for the time being until this is all figured out. I leave on vacation on Monday and would be good to have a working openbot build before that.

Andrej730 commented 1 week ago

Sure, let's revert it for now.

Moult commented 1 week ago

So even though this was reverted, my build recently started making .so files for Python 3.12 which was a bit odd, I'm pretty sure it didn't do that in the past (I have multiple Python versions installed on Gentoo, of which Python 3.12 is the main one, but I run cmake from within a Python 3.11 venv).

Not sure if at all relevant but I added these three args when calling ccmake:

    -DPYTHON_EXECUTABLE=/usr/bin/python3.11 \
    -DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \
    -DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so \