File: update-python

package info (click to toggle)
libm2k 0.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 95,560 kB
  • sloc: xml: 1,611,497; cpp: 16,278; python: 4,181; cs: 516; sh: 471; ansic: 403; makefile: 33
file content (33 lines) | stat: -rw-r--r-- 1,502 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
From cb9aabf68d00c0113817c711ccbdca2b3b5fb97e Mon Sep 17 00:00:00 2001
From: "A. Maitland Bottoms" <bottoms@debian.org>
Date: Fri, 26 Apr 2024 17:22:28 -0400
Subject: [PATCH 1/2] update python
Forwarded: not-needed

Do a local Python install as part of the build, then let CMake
handle the install step. Allows package tools to work.
---
 bindings/python/CMakeLists.txt | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- a/bindings/python/CMakeLists.txt
+++ b/bindings/python/CMakeLists.txt
@@ -205,9 +205,17 @@
 add_custom_target(${PROJECT_NAME}py ALL DEPENDS _${PROJECT_NAME} WORKING_DIRECTORY
 	${CMAKE_BINARY_DIR} COMMAND ${PYTHON_EXECUTABLE_LIB_VERSION} ${SETUP_PY} build)
 
+add_custom_target(${PROJECT_NAME}py_staged ALL DEPENDS ${PROJECT_NAME}py WORKING_DIRECTORY
+	${CMAKE_BINARY_DIR} COMMAND ${PYTHON_EXECUTABLE_LIB_VERSION} ${SETUP_PY} install
+		--record=${CMAKE_BINARY_DIR}/install_manifest_py.txt
+		--root=${PROJECT_NAME}py_staged --prefix=${CMAKE_INSTALL_PREFIX})
+
+install(DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME}py_staged${CMAKE_INSTALL_PREFIX}
+	DESTINATION ${CMAKE_INSTALL_PREFIX}/..)
+
 if(NOT SKIP_INSTALL_ALL)
 	install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 		COMMAND ${PYTHON_EXECUTABLE_LIB_VERSION} ${SETUP_PY} install
 		--record=${CMAKE_BINARY_DIR}/install_manifest_py.txt
-		--root=\$ENV{DESTDIR}/ --prefix=${CMAKE_INSTALL_PREFIX})")
+		--root=${PROJECT_NAME}pystaged/$ENV{DESTDIR} --prefix=${CMAKE_INSTALL_PREFIX})")
 endif()