1 # fix building non-pure-python modules on cross
2 if [ -n "$CROSS_BUILD" ]; then
3 export PYPREFIX
="$XBPS_CROSS_BASE"
4 export CFLAGS
+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
5 export LDFLAGS
+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib"
6 export CC
="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
7 export LDSHARED
="${CC} -shared $LDFLAGS"
8 export PYTHON_CONFIG
="${XBPS_CROSS_BASE}/usr/bin/python3-config"
9 export PYTHONPATH
="${XBPS_CROSS_BASE}/${py3_lib}"
10 for f
in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_
*; do
11 [ -f "$f" ] ||
continue
13 _PYTHON_SYSCONFIGDATA_NAME
=${f%.py}
15 [ -n "$_PYTHON_SYSCONFIGDATA_NAME" ] && export _PYTHON_SYSCONFIGDATA_NAME