summaryrefslogtreecommitdiff
blob: 933d2965b2bccdeecfb99018ff366097e12b0b3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Bernd Waibel <waebbl-gentoo@posteo.net>
Date: Sat, 4 Dec 2021 20:45:49 +0100
Subject: [PATCH] unconditionally search Python interpreter

When setting PYOPENVDB_INSTALL_DIRECTORY, CMake would fail with:
```
-- Could NOT find Python (missing: Python_LIBRARIES Development Development.Module Development.Embed) (found version "3.9.9")
CMake Error at openvdb/openvdb/python/CMakeLists.txt:65 (message):
  Could NOT find Python::Module (Required is at least version "2.7")
Call Stack (most recent call first):
  openvdb/openvdb/python/CMakeLists.txt:112 (openvdb_check_python_version)
  ```

It seems like we always need to search for the interpreter.

Bug: https://bugs.gentoo.org/790350
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
--- a/openvdb/openvdb/python/CMakeLists.txt
+++ b/openvdb/openvdb/python/CMakeLists.txt
@@ -73,10 +73,7 @@ endfunction()
 #   target but this was only added in CMake 3.15. See:
 #      https://github.com/AcademySoftwareFoundation/openvdb/issues/886
 set(OPENVDB_PYTHON_DEPS)
-set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development)
-if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY)
-    list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter)
-endif()
+set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development Interpreter)
 
 if(${CMAKE_VERSION} VERSION_LESS 3.14)
   find_package(Python QUIET COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS})
-- 
2.34.1