summaryrefslogtreecommitdiffstats
path: root/library/python/runtime_py3
diff options
context:
space:
mode:
authorkuzmich321 <[email protected]>2025-08-04 21:11:07 +0300
committerkuzmich321 <[email protected]>2025-08-04 22:16:42 +0300
commit78b39e84c02a1fe198c07279e3ad46245fa09981 (patch)
tree891c70e3d96264a4ad19b700c53f8b05e3df84c3 /library/python/runtime_py3
parentd1486eddc9e9da29f76c1fae5550805eec939482 (diff)
add DUSE_PYTHON3_PREV support
commit_hash:b2e89d949d9560889cc979429e8fa79494368f76
Diffstat (limited to 'library/python/runtime_py3')
-rw-r--r--library/python/runtime_py3/main/main.c2
-rw-r--r--library/python/runtime_py3/main/ya.make19
-rw-r--r--library/python/runtime_py3/stage0pycc/ya.make13
-rw-r--r--library/python/runtime_py3/ya.make14
4 files changed, 38 insertions, 10 deletions
diff --git a/library/python/runtime_py3/main/main.c b/library/python/runtime_py3/main/main.c
index 21742d263c3..71671f561be 100644
--- a/library/python/runtime_py3/main/main.c
+++ b/library/python/runtime_py3/main/main.c
@@ -1,5 +1,5 @@
#include <Python.h>
-#include <contrib/tools/python3/Include/internal/pycore_runtime.h> // _PyRuntime_Initialize()
+#include <internal/pycore_runtime.h> // _PyRuntime_Initialize()
#include <stdlib.h>
#include <string.h>
diff --git a/library/python/runtime_py3/main/ya.make b/library/python/runtime_py3/main/ya.make
index 13449602a9d..ab1924dec29 100644
--- a/library/python/runtime_py3/main/ya.make
+++ b/library/python/runtime_py3/main/ya.make
@@ -1,13 +1,24 @@
LIBRARY()
PEERDIR(
- contrib/tools/python3
library/cpp/resource
)
-ADDINCL(
- contrib/tools/python3/Include
-)
+IF (USE_PYTHON3_PREV)
+ PEERDIR(
+ contrib/tools/python3_prev
+ )
+ ADDINCL(
+ contrib/tools/python3_prev/Include
+ )
+ELSE()
+ PEERDIR(
+ contrib/tools/python3
+ )
+ ADDINCL(
+ contrib/tools/python3/Include
+ )
+ENDIF()
CFLAGS(
-DPy_BUILD_CORE
diff --git a/library/python/runtime_py3/stage0pycc/ya.make b/library/python/runtime_py3/stage0pycc/ya.make
index b182365da87..312a0fe8adf 100644
--- a/library/python/runtime_py3/stage0pycc/ya.make
+++ b/library/python/runtime_py3/stage0pycc/ya.make
@@ -1,9 +1,16 @@
PROGRAM()
PYTHON3_ADDINCL()
-PEERDIR(
- contrib/tools/python3
-)
+
+IF (USE_PYTHON3_PREV)
+ PEERDIR(
+ contrib/tools/python3_prev
+ )
+ELSE()
+ PEERDIR(
+ contrib/tools/python3
+ )
+ENDIF()
SRCS(main.cpp)
diff --git a/library/python/runtime_py3/ya.make b/library/python/runtime_py3/ya.make
index b2d0dbf51ee..02151c760c7 100644
--- a/library/python/runtime_py3/ya.make
+++ b/library/python/runtime_py3/ya.make
@@ -3,11 +3,21 @@ PY3_LIBRARY()
STYLE_PYTHON()
PEERDIR(
- contrib/tools/python3
- contrib/tools/python3/lib2/py
library/cpp/resource
)
+IF (USE_PYTHON3_PREV)
+ PEERDIR(
+ contrib/tools/python3_prev
+ contrib/tools/python3_prev/lib2/py
+ )
+ELSE()
+ PEERDIR(
+ contrib/tools/python3
+ contrib/tools/python3/lib2/py
+ )
+ENDIF()
+
NO_PYTHON_INCLUDES()
ENABLE(PYBUILD_NO_PYC)