aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python/pyconfig.inc
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /contrib/tools/python/pyconfig.inc
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'contrib/tools/python/pyconfig.inc')
-rw-r--r--contrib/tools/python/pyconfig.inc48
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/tools/python/pyconfig.inc b/contrib/tools/python/pyconfig.inc
new file mode 100644
index 0000000000..01da7d4566
--- /dev/null
+++ b/contrib/tools/python/pyconfig.inc
@@ -0,0 +1,48 @@
+NO_COMPILER_WARNINGS()
+
+ENABLE(USE_ARCADIA_PYTHON)
+
+SET(PYTHON_DIR "contrib/tools/python")
+SET(PYTHON_SRC_DIR "${PYTHON_DIR}/src")
+
+SET(PYTHON_ROOT "${ARCADIA_ROOT}/${PYTHON_DIR}")
+SET(PYTHON_SRC_ROOT "${ARCADIA_ROOT}/${PYTHON_SRC_DIR}")
+
+SET(PYTHON_FLAGS "-DPy_BUILD_CORE")
+
+ADDINCL(${PYTHON_SRC_DIR}/Include)
+
+CFLAGS(
+ -DUNQUOTED_VERSION=2.7
+)
+
+IF (NOT WIN32)
+ EXTRALIBS(-lutil)
+
+ IF (LINUX)
+ EXTRALIBS(-ldl)
+
+ CFLAGS(
+ -DUNQUOTED_PYTHONPATH=:plat-linux2
+ -DUNQUOTED_PLATFORM=linux2
+ )
+ ELSEIF (FREEBSD)
+ CFLAGS(
+ -DUNQUOTED_PYTHONPATH=:plat-freebsd${FREEBSD_VER}
+ -DUNQUOTED_PLATFORM=freebsd${FREEBSD_VER}
+ )
+ ELSEIF (DARWIN)
+ CFLAGS(
+ -DUNQUOTED_PYTHONPATH=:plat-darwin
+ -DUNQUOTED_PLATFORM=darwin
+ )
+ LDFLAGS(
+ -framework SystemConfiguration
+ -framework CoreFoundation
+ )
+ ENDIF ()
+ENDIF ()
+
+IF (MSVC)
+ CFLAGS(/DXMLCALL= /DXMLIMPORT=)
+ENDIF ()