File: 0002-Python-package-installation-path.patch

package info (click to toggle)
python-ocp 7.8.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 64,724 kB
  • sloc: cpp: 362,337; pascal: 33; python: 23; makefile: 4
file content (42 lines) | stat: -rw-r--r-- 1,657 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
40
41
42
From: Roland Mas <roland.mas@entierement.net>
Date: Wed, 30 Jul 2025 02:14:22 +0200
Subject: Python package installation path

---
 OCP/CMakeLists.txt      | 4 ++--
 templates/CMakeLists.j2 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/OCP/CMakeLists.txt b/OCP/CMakeLists.txt
index 1cac14a..a64c98d 100644
--- a/OCP/CMakeLists.txt
+++ b/OCP/CMakeLists.txt
@@ -11,7 +11,7 @@ list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} )
 find_package (Python REQUIRED COMPONENTS Interpreter Development)
 message( STATUS "Python lib: ${Python_LIBRARIES}" )
 
-SET(PYTHON_SP_DIR "site-packages" CACHE PATH "Python site-packages directory (for installing)")
+SET(PYTHON_SP_DIR "lib/python3/dist-packages" CACHE PATH "Python site-packages directory (for installing)")
 
 find_package( pybind11 REQUIRED )
 find_package( VTK REQUIRED
@@ -71,4 +71,4 @@ if(APPLE)
 endif()
 
 
-install( TARGETS OCP LIBRARY DESTINATION ${PYTHON_SP_DIR} )
\ No newline at end of file
+install( TARGETS OCP LIBRARY DESTINATION ${PYTHON_SP_DIR} )
diff --git a/templates/CMakeLists.j2 b/templates/CMakeLists.j2
index 438b080..c4f3428 100755
--- a/templates/CMakeLists.j2
+++ b/templates/CMakeLists.j2
@@ -11,7 +11,7 @@ list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} )
 find_package (Python REQUIRED COMPONENTS Interpreter Development)
 message( STATUS "Python lib: ${Python_LIBRARIES}" )
 
-SET(PYTHON_SP_DIR "site-packages" CACHE PATH "Python site-packages directory (for installing)")
+SET(PYTHON_SP_DIR "lib/python3/dist-packages" CACHE PATH "Python site-packages directory (for installing)")
 
 find_package( pybind11 REQUIRED )
 find_package( VTK REQUIRED