File: python3-sitearch

package info (click to toggle)
pynest2d 5.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 244 kB
  • sloc: python: 30; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 1,223 bytes parent folder | download
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
From: Gregor Riepl <onitake@gmail.com>
Date: Fri, 20 May 2022 16:47:50 -0600
Subject: Install to correct site-packages dir, based on Python version.

This is required, because SIP packages need to be compiled and installed
for every Python version separately.
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f93e89a..0a31254 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
 if(NOT DEFINED Python_VERSION)
     set(Python_VERSION
-            3.10
+            ${PYVER}
             CACHE STRING "Python Version" FORCE)
     message(STATUS "Setting Python version to ${Python_VERSION}. Set Python_VERSION if you want to compile against an other version.")
 endif()
@@ -25,6 +25,7 @@ else()
     set(Python_EXECUTABLE ${cpython_PACKAGE_FOLDER_RELEASE}/bin/python3)
     set(ENV{PYTHONPATH} ${Python_SITEARCH})
 endif()
+set(Python_SITEARCH lib${LIB_SUFFIX}/python${PYVER}/site-packages CACHE STRING "Directory to install Python bindings to")
 message(STATUS "Linking and building ${project_name} against Python ${Python_VERSION}")
 
 find_package(SIP REQUIRED 6.5.0)