You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/gdl/files/0.9.6-python-use-path-and-s...

21 lines
682 B

Author: Ole Streicher <olebole@debian.org>
Description: Initialize GDL path if one is defined
Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/93/
--- a/src/pythongdl.cpp
+++ b/src/pythongdl.cpp
@@ -537,6 +537,14 @@
// instantiate the interpreter (creates $MAIN$ environment)
interpreter = new DInterpreter();
+ string gdlPath=GetEnvString("GDL_PATH");
+ if( gdlPath == "") gdlPath=GetEnvString("IDL_PATH");
+ if( gdlPath == "")
+ {
+ gdlPath = "+" GDLDATADIR "/lib";
+ }
+ SysVar::SetGDLPath( gdlPath);
+
PyObject* m = Py_InitModule("GDL", GDLMethods);
gdlError = PyErr_NewException((char*)"GDL.error", NULL, NULL);