Commit b2d62e40 authored by Jack Jansen's avatar Jack Jansen

Obtain path from a resource (unless USE_BUILTIN_PATH is #defined)

parent ed6a9c1e
...@@ -142,7 +142,7 @@ getcopyright() ...@@ -142,7 +142,7 @@ getcopyright()
#ifndef PYTHONPATH #ifndef PYTHONPATH
#ifdef macintosh #ifdef macintosh
/* Mod by Jack: \n is now separator. */ /* Mod by Jack: \n is now separator. */
#define PYTHONPATH ":\n:Lib\n:Lib:stdwin\n:Lib:test\n:Lib:mac" #define PYTHONPATH ":\n:Lib\n:Lib:stdwin\n:Lib:test\n:Lib:mac\n:PackedLib\n:PlugIns"
#endif /* macintosh */ #endif /* macintosh */
#endif /* !PYTHONPATH */ #endif /* !PYTHONPATH */
...@@ -172,10 +172,17 @@ getpythonpath() ...@@ -172,10 +172,17 @@ getpythonpath()
char *p, *endp; char *p, *endp;
int newlen; int newlen;
extern char *PyMac_GetPythonDir(); extern char *PyMac_GetPythonDir();
extern char *PyMac_GetScriptPath(); #ifndef USE_BUILTIN_PATH
extern char *PyMac_GetPythonPath();
#endif
if ( pythonpath ) return pythonpath; if ( pythonpath ) return pythonpath;
curwd = PyMac_GetPythonDir(); curwd = PyMac_GetPythonDir();
#ifndef USE_BUILTIN_PATH
if ( pythonpath = PyMac_GetPythonPath(curwd) )
return pythonpath;
printf("Warning: No pythonpath resource found, using builtin default\n");
#endif
p = PYTHONPATH; p = PYTHONPATH;
endp = p; endp = p;
pythonpath = malloc(2); pythonpath = malloc(2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment