2 from ctypes
import Structure, c_double
3 from pathlib
import Path
8 _script_dir = Path(__file__).parent
10 _script_dir = Path(sys.argv[0]).parent
if len(sys.argv) > 0
else Path.cwd()
13 _lib_path = _script_dir /
"build" /
"libmylib.so"
14 _lib = ctypes.CDLL(
str(_lib_path))
24 _lib.ellipsoidTransform.argtypes = (c_double, c_double)
25 _lib.ellipsoidTransform.restype = Pair
26 _lib.ellipsoidTransformInverse.argtypes = (c_double, c_double)
27 _lib.ellipsoidTransformInverse.restype = Pair
29 _lib.sphereTransform.argtypes = (c_double, c_double)
30 _lib.sphereTransform.restype = Pair
31 _lib.sphereTransformInverse.argtypes = (c_double, c_double)
32 _lib.sphereTransformInverse.restype = Pair
34 ellipsoidTransform = _lib.ellipsoidTransform
35 ellipsoidTransformInverse = _lib.ellipsoidTransformInverse
37 sphereTransform = _lib.sphereTransform
38 sphereTransformInverse = _lib.sphereTransformInverse