Lines Matching +full:is +full:- +full:path +full:- +full:inside
2 * This wrapper program executes a python executable hidden inside an
3 * application bundle inside the Python framework. This is needed to run
4 * GUI code: some GUI API's don't work unless the program is inside an
8 * slightly more control over how the "real" interpreter is executed.
31 #include <mach-o/dyld.h>
40 * In a regular framework the structure is:
47 * structure is:
51 * /.Python <- the dylib
55 * feature, support for that structure is provided as
77 end = g_path + len - 1; in get_python_path()
79 end --; in get_python_path()
108 * "arch -ppc python" in setup_spawnattr()
132 cpu_types, &ocount) == -1) { in setup_spawnattr()
157 static char path[PATH_MAX * 2]; in main() local
162 /* Set the original executable path in the environment. */ in main()
163 status = _NSGetExecutablePath(path, &size); in main()
168 * breaks "pyvenv --symlink" in main()
170 * It is nice to have the directory name in main()
171 * as a cleaned up absolute path though, in main()
172 * therefore call realpath on dirname(path) in main()
174 char* slash = strrchr(path, '/'); in main()
179 if (realpath(path, real_path) == NULL) { in main()
180 err(1, "realpath: %s", path); in main()
185 err(1, "realpath: %s", path); in main()
190 err(1, "realpath: %s", path); in main()
194 err(1, "realpath: %s", path); in main()
196 if (strlcat(real_path, path, sizeof(real_path)) > sizeof(real_path)) { in main()
198 err(1, "realpath: %s", path); in main()
203 * The environment variable is used to pass the value of real_path in main()
204 * to the actual python interpreter, and is read by code in in main()
208 * interpreter and can behave as if this launcher is the real in main()
215 * Let argv[0] refer to the new interpreter. This is needed to in main()
216 * get the effect we want on OSX 10.5 or earlier. That is, without in main()
223 /* We're weak-linking to posix-spawnv to ensure that in main()