"""Prepare ctypes library at ./libplomrogue.so"""
libpath = ("./libplomrogue.so")
if not os.access(libpath, os.F_OK):
- raise SystemExit("No library " + libpath + ", run ./compile.sh first?")
+ raise SystemExit("No library " + libpath +
+ ", run ./compile-server.sh first?")
libpr = ctypes.cdll.LoadLibrary(libpath)
libpr.seed_rrand.argtypes = [ctypes.c_uint8, ctypes.c_uint32]
libpr.seed_rrand.restype = ctypes.c_uint32
# <https://github.com/plomlompom/plomrogue/issues/2#issuecomment-50972436> for a
# workaround.
+if [ ! -e ./libplomrogue.so ]
+then
+ echo "non-redo stuff (preparing for future Python port sans redo needs):"
+ echo "Building library for server's Python variant with mere shell one-liner."
+ ./compile-server.sh
+fi
+
export PATH=$PATH:$PWD/build/redo_scripts
redo "$@"