Pass target UNAME_SYSNAME during Cython cross compilation.
Fixes ya make infra/netlibus/pylib --target-platform=darwin
@@ -177,6 +177,18 @@ ${output_include;hide:"contrib/libs/python/Include/compile.h"} \
${output_include;hide:"contrib/libs/python/Include/frameobject.h"} \
${output_include;hide:"contrib/libs/python/Include/traceback.h"}
+CYTHON_OPTIONS=
+when ($OS_LINUX) {
+ CYTHON_OPTIONS += -E UNAME_SYSNAME=Linux
+}
+elsewhen ($OS_DARWIN) {
+ CYTHON_OPTIONS += -E UNAME_SYSNAME=Darwin
+}
+elsewhen ($OS_WINDOWS) {
+ CYTHON_OPTIONS += -E UNAME_SYSNAME=Windows
+}
+
+
# PYTHON_DISTR={ "default" | "macos-brew" } determine python system supply
# see contrib/libs/platform/python/ya.make
PYTHON_DISTR="default"
@@ -2249,7 +2261,7 @@ macro _SRC("gztproto", SRC, SRCFLAGS...) {
macro _SRC("pyx", SRC, SRCFLAGS...) {
# Copy-paste from BUILDWITH_CYTHON
- .CMD=$YMAKE_PYTHON $CYTHON_SCRIPT --cplus -I$ARCADIA_ROOT ${input:SRC} -o ${output;tobindir:SRC.cpp} $CYTHON_OUTPUT_INCLUDES ${SRCFLAGS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
+ .CMD=$YMAKE_PYTHON $CYTHON_SCRIPT $CYTHON_OPTIONS --cplus -I$ARCADIA_ROOT ${input:SRC} -o ${output;tobindir:SRC.cpp} $CYTHON_OUTPUT_INCLUDES ${SRCFLAGS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
.ADDINCL=contrib/tools/cython/Cython/Includes
}
