aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-08-23 00:39:08 +0300
committershadchin <shadchin@yandex-team.com>2024-08-23 00:48:04 +0300
commit2f7de7ab0e19a56781fc267da1543ff034098ded (patch)
tree7d48b1523ec26e9e94054c4b81e185a05b312597
parent3cfc201582bc9f384f25d34f4abeea74222bf0f7 (diff)
downloadydb-2f7de7ab0e19a56781fc267da1543ff034098ded.tar.gz
Switch on platform_dispatchers
93438876ebd102c07d52ce42cc48e5465a7277ff
-rw-r--r--contrib/tools/python3/Include/pyconfig-linux.h5
-rw-r--r--contrib/tools/python3/Include/pyconfig-osx-arm64.h5
-rw-r--r--contrib/tools/python3/Include/pyconfig-win.h5
-rw-r--r--contrib/tools/python3/Include/pyconfig.h30
-rw-r--r--contrib/tools/python3/ya.make19
5 files changed, 32 insertions, 32 deletions
diff --git a/contrib/tools/python3/Include/pyconfig-linux.h b/contrib/tools/python3/Include/pyconfig-linux.h
index 967ba21e95..2eec3b5a21 100644
--- a/contrib/tools/python3/Include/pyconfig-linux.h
+++ b/contrib/tools/python3/Include/pyconfig-linux.h
@@ -1612,7 +1612,10 @@
#define PY_SUPPORT_TIER 1
/* Define if you want to build an interpreter with many run-time checks. */
-/* #undef Py_DEBUG */
+#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
+#define Py_DEBUG
+#define GC_NDEBUG
+#endif
/* Defined if Python is built as a shared library. */
/* #undef Py_ENABLE_SHARED */
diff --git a/contrib/tools/python3/Include/pyconfig-osx-arm64.h b/contrib/tools/python3/Include/pyconfig-osx-arm64.h
index c4b7d087b7..81e4e3c15b 100644
--- a/contrib/tools/python3/Include/pyconfig-osx-arm64.h
+++ b/contrib/tools/python3/Include/pyconfig-osx-arm64.h
@@ -1610,7 +1610,10 @@
#define PY_SUPPORT_TIER 2
/* Define if you want to build an interpreter with many run-time checks. */
-/* #undef Py_DEBUG */
+#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
+#define Py_DEBUG
+#define GC_NDEBUG
+#endif
/* Defined if Python is built as a shared library. */
/* #undef Py_ENABLE_SHARED */
diff --git a/contrib/tools/python3/Include/pyconfig-win.h b/contrib/tools/python3/Include/pyconfig-win.h
index bb262ada0e..4345627c3f 100644
--- a/contrib/tools/python3/Include/pyconfig-win.h
+++ b/contrib/tools/python3/Include/pyconfig-win.h
@@ -4,4 +4,9 @@
#define Py_NO_ENABLE_SHARED
+#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
+#define Py_DEBUG
+#define GC_NDEBUG
+#endif
+
#include "../PC/pyconfig.h"
diff --git a/contrib/tools/python3/Include/pyconfig.h b/contrib/tools/python3/Include/pyconfig.h
index 61a18f6c28..a07364c7ff 100644
--- a/contrib/tools/python3/Include/pyconfig.h
+++ b/contrib/tools/python3/Include/pyconfig.h
@@ -1,35 +1,5 @@
#pragma once
-#if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) || defined(Py_BUILD_CORE_MODULE)
-
-#define ABIFLAGS ""
-
-// Need for Modules/getpath.c
-#define PREFIX "/var/empty"
-#define EXEC_PREFIX "/var/empty"
-#define VERSION "3.12"
-#define VPATH ""
-#define PLATLIBDIR "lib"
-
-#define USE_ZLIB_CRC32
-
-#if defined(__linux__)
-# define PLATFORM "linux"
-# define MULTIARCH "x86_64-linux-gnu"
-# define SOABI "cpython-312-x86_64-linux-gnu"
-#elif defined(__APPLE__)
-# define PLATFORM "darwin"
-# define MULTIARCH "darwin"
-# define SOABI "cpython-312-darwin"
-#endif
-
-#endif
-
-#if !defined(NDEBUG) && !defined(Py_DEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
-#define Py_DEBUG
-#define GC_NDEBUG
-#endif
-
#if defined(__APPLE__) && (defined(__aarch64__) || defined(_M_ARM64))
# include "pyconfig-osx-arm64.h"
#elif defined(__APPLE__) && (defined(__x86_64__) || defined(_M_X64))
diff --git a/contrib/tools/python3/ya.make b/contrib/tools/python3/ya.make
index 8c845970c0..e420ea289c 100644
--- a/contrib/tools/python3/ya.make
+++ b/contrib/tools/python3/ya.make
@@ -38,6 +38,13 @@ NO_UTIL()
CFLAGS(
-DPy_BUILD_CORE
-DPy_BUILD_CORE_BUILTIN
+ -DUSE_ZLIB_CRC32
+ -DABIFLAGS=\"\"
+ -DPREFIX=\"/var/empty\"
+ -DEXEC_PREFIX=\"/var/empty\"
+ -DVERSION=\"3.12\"
+ -DVPATH=\"\"
+ -DPLATLIBDIR=\"lib\"
)
IF (CLANG_CL)
@@ -47,10 +54,22 @@ IF (CLANG_CL)
ENDIF()
IF (OS_DARWIN)
+ CFLAGS(
+ -DPLATFORM=\"darwin\"
+ -DMULTIARCH=\"darwin\"
+ -DSOABI=\"cpython-312-darwin\"
+ )
+
LDFLAGS(
-framework CoreFoundation
-framework SystemConfiguration
)
+ELSEIF (OS_LINUX)
+ CFLAGS(
+ -DPLATFORM=\"linux\"
+ -DMULTIARCH=\"x86_64-linux-gnu\"
+ -DSOABI=\"cpython-312-x86_64-linux-gnu\"
+ )
ELSEIF (OS_WINDOWS)
CFLAGS(
-DPY3_DLLNAME=L\"python3\"