diff options
author | Guido van Rossum <guido@python.org> | 1996-06-12 04:20:27 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-06-12 04:20:27 (GMT) |
commit | c34c9a50016f31db443a9afdf717f48eca9d34d9 (patch) | |
tree | 9feabe43740ebd0c795299c7b438fc4b14723bd9 /Modules/getpath.c | |
parent | 006bf915300a459978d02fbb8523852db7051f75 (diff) | |
download | cpython-c34c9a50016f31db443a9afdf717f48eca9d34d9.zip cpython-c34c9a50016f31db443a9afdf717f48eca9d34d9.tar.gz cpython-c34c9a50016f31db443a9afdf717f48eca9d34d9.tar.bz2 |
provide access to $(exec_)prefix
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r-- | Modules/getpath.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index 4f49cc3..a502d37 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -32,6 +32,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define PYTHONPATH ".:/usr/local/lib/python" #endif +#ifndef PREFIX +#define PREFIX "/usr/local" +#endif + +#ifndef EXEC_PREFIX +#define EXEC_PREFIX "/usr/local" +#endif + /* This is called once from pythonrun to initialize sys.path. The environment variable PYTHONPATH is fetched and the default path @@ -65,3 +73,18 @@ Py_GetPath() strcpy(p, defpath); return buf; } + + +/* Similar for Makefile variables $prefix and $exec_prefix */ + +char * +Py_GetPrefix() +{ + return PREFIX; +} + +char * +Py_GetExecPrefix() +{ + return EXEC_PREFIX; +} |