Skip to content

Instantly share code, notes, and snippets.

@porowns
Created August 19, 2019 15:57
Show Gist options
  • Save porowns/aea5d8d8eed8cc853f3a588cb463d109 to your computer and use it in GitHub Desktop.
Save porowns/aea5d8d8eed8cc853f3a588cb463d109 to your computer and use it in GitHub Desktop.
Example build script for Python 3 extension on z/OS
echo "Compiling Types"
eval "xlc -DNDEBUG -O2 -qdll -qexportall -qascii -q64 -qnocse -qfloat=ieee -qgonum -qbitfield=signed -qlanglvl=extc1x -D__MV17195__ -D_XOPEN_SOURCE=600 -I$PYTHON_HOME/include/python3.6m -o types.o -c $PROJECT_ROOT/src/types.c"
eval "xlc -Wl,dll -q64 -qexportall -L$PYTHON_HOME/lib/ -o types.so types.o $PYTHON_HOME/lib/libpython3.6m.x"
echo "Compiling Example"
eval "xlc -DNDEBUG -O2 -qdll -qexportall -qascii -q64 -qnocse -qfloat=ieee -qgonum -qbitfield=signed -qlanglvl=extc1x -D__MV17195__ -D_XOPEN_SOURCE=600 -I$PYTHON_HOME/include/python3.6m -o Example.o -c $PROJECT_ROOT/src/Example.c"
eval "xlc -Wl,dll -q64 -qexportall -L$PYTHON_HOME/lib/ -o Example.so Example.o $PYTHON_HOME/lib/libpython3.6m.x"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment