forked from jerryscript-project/iotjs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debian/patches: Select python3 from env if needed
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
debian/patches/0003-cmake-Allow-one-to-select-python3-from-env.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From: Philippe Coval <[email protected]> | ||
Date: Fri, 24 Jul 2020 13:03:51 +0200 | ||
Subject: cmake: Select python3 from env if needed | ||
|
||
Bug: https://github.com/jerryscript-project/iotjs/issues/1945 | ||
Bug-Debian: https://bugs.debian.org/936738 | ||
Forwarded: https://github.com/jerryscript-project/iotjs/pull/1946 | ||
Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/python/review/master | ||
Last-Update: 2020-07-25 | ||
|
||
This will be useful for next debian release shipping python3 | ||
|
||
Change-Id: Ie3a9e8ea9152247efa85a4e87bd121016a466795 | ||
IoT.js-DCO-1.0-Signed-off-by: Philippe Coval [email protected] | ||
--- | ||
cmake/iotjs.cmake | 8 ++++++-- | ||
1 file changed, 6 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/cmake/iotjs.cmake b/cmake/iotjs.cmake | ||
index ce54711..28bd736 100644 | ||
--- a/cmake/iotjs.cmake | ||
+++ b/cmake/iotjs.cmake | ||
@@ -16,6 +16,10 @@ cmake_minimum_required(VERSION 2.8) | ||
|
||
set(IOTJS_SOURCE_DIR ${ROOT_DIR}/src) | ||
|
||
+if(NOT DEFINED PYTHON) | ||
+ set(PYTHON "python") | ||
+endif() | ||
+ | ||
function(find_value RESULT VALUE VALUE_TRUE VALUE_FALSE) | ||
list(FIND ARGN ${VALUE} idx) | ||
if(${idx} GREATER -1) | ||
@@ -53,7 +57,7 @@ if(ENABLE_MINIMAL) | ||
endif() | ||
|
||
execute_process( | ||
- COMMAND python ${ROOT_DIR}/tools/module_analyzer.py | ||
+ COMMAND ${PYTHON} ${ROOT_DIR}/tools/module_analyzer.py | ||
--mode cmake-dump | ||
--target-os ${TARGET_OS} | ||
--iotjs-include-module "${IOTJS_INCLUDE_MODULE}" | ||
@@ -101,7 +105,7 @@ endif() | ||
|
||
add_custom_command( | ||
OUTPUT ${IOTJS_SOURCE_DIR}/iotjs_js.c ${IOTJS_SOURCE_DIR}/iotjs_js.h | ||
- COMMAND python ${ROOT_DIR}/tools/js2c.py | ||
+ COMMAND ${PYTHON} ${ROOT_DIR}/tools/js2c.py | ||
ARGS --buildtype=${JS2C_RUN_MODE} | ||
--modules '${IOTJS_JS_MODULES}' | ||
${JS2C_SNAPSHOT_ARG} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
0001-iotjs-Install-binaries-to-system-1134.patch | ||
0002-build-Install-headers-to-system.patch | ||
0003-cmake-Allow-one-to-select-python3-from-env.patch |