Kaydet (Commit) d7763621 authored tarafından Guido van Rossum's avatar Guido van Rossum

Another change suggested by Donn Cave -- forget "step 5", which

searches /usr/local, /usr and /.
üst 573a24a4
...@@ -106,9 +106,6 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -106,9 +106,6 @@ PERFORMANCE OF THIS SOFTWARE.
* PREFIX and EXEC_PREFIX. These are supplied by the Makefile but can be * PREFIX and EXEC_PREFIX. These are supplied by the Makefile but can be
* passed in as options to the configure script. * passed in as options to the configure script.
* *
* Step 5. Search some `standard' directories, namely: /usr/local, /usr,
* then finally /.
*
* That's it! * That's it!
* *
* Well, almost. Once we have determined prefix and exec_prefix, the * Well, almost. Once we have determined prefix and exec_prefix, the
...@@ -153,8 +150,6 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -153,8 +150,6 @@ PERFORMANCE OF THIS SOFTWARE.
#define LANDMARK "string.py" #define LANDMARK "string.py"
#endif #endif
static char *std_dirs[] = {"/usr/local/", "/usr/", "/", NULL};
static char prefix[MAXPATHLEN+1]; static char prefix[MAXPATHLEN+1];
static char exec_prefix[MAXPATHLEN+1]; static char exec_prefix[MAXPATHLEN+1];
static char *module_search_path = NULL; static char *module_search_path = NULL;
...@@ -266,14 +261,7 @@ search_for_prefix(argv0_path, home) ...@@ -266,14 +261,7 @@ search_for_prefix(argv0_path, home)
if (exists(prefix)) if (exists(prefix))
return 1; return 1;
/* Look at `standard' directories */ /* Fail */
for (i = 0; std_dirs[i]; i++) {
strcpy(prefix, std_dirs[i]);
join(prefix, lib_python);
join(prefix, LANDMARK);
if (exists(prefix))
return 1;
}
return 0; return 0;
} }
...@@ -326,14 +314,7 @@ search_for_exec_prefix(argv0_path, home) ...@@ -326,14 +314,7 @@ search_for_exec_prefix(argv0_path, home)
if (exists(exec_prefix)) if (exists(exec_prefix))
return 1; return 1;
/* Look at `standard' directories */ /* Fail */
for (i = 0; std_dirs[i]; i++) {
strcpy(exec_prefix, std_dirs[i]);
join(exec_prefix, lib_python);
join(exec_prefix, "sharedmodules");
if (exists(exec_prefix))
return 1;
}
return 0; return 0;
} }
......
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