File: 2003-remove-cmake-python-install-hack.patch

package info (click to toggle)
libsavitar 4.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 800 kB
  • sloc: cpp: 11,325; xml: 179; sh: 17; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 737 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Author: Gregor Riepl <onitake@gmail.com>
Description: Install to correct site-packages dir, based on Python version.
  The Debian hack in CMakeLists was removed upstream, but python3 doesn't
  report a Python-specific site-packages folder.
  This is required, because SIP packages need to be compiled and installed
  for every Python version separately.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,8 @@ if(BUILD_PYTHON)
         set(LIB_SUFFIX "")
     endif()
 
+    set(Python3_SITEARCH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE STRING "Directory to install Python bindings to")
+
     include_directories(python/ src/ ${SIP_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS})
 endif()