diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2016-07-07 14:05:05 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2016-07-28 17:10:15 +0200 |
commit | 1da6775775e3695ff206bdcd3fca945bf5331101 (patch) | |
tree | 9da34dc021261438f4bd6603ea0980a9bbb75c9f /pkgs/development/interpreters/python/cpython/2.7/2.7.3-getpath-exe-extension.patch | |
parent | 86393cfc205c4f8d474b928878b45b118f2c7b16 (diff) | |
download | nixlib-1da6775775e3695ff206bdcd3fca945bf5331101.tar nixlib-1da6775775e3695ff206bdcd3fca945bf5331101.tar.gz nixlib-1da6775775e3695ff206bdcd3fca945bf5331101.tar.bz2 nixlib-1da6775775e3695ff206bdcd3fca945bf5331101.tar.lz nixlib-1da6775775e3695ff206bdcd3fca945bf5331101.tar.xz nixlib-1da6775775e3695ff206bdcd3fca945bf5331101.tar.zst nixlib-1da6775775e3695ff206bdcd3fca945bf5331101.zip |
Python: move interpreters
Move Python interpreters (CPython, PyPy) to same folder and share layout.
Diffstat (limited to 'pkgs/development/interpreters/python/cpython/2.7/2.7.3-getpath-exe-extension.patch')
-rw-r--r-- | pkgs/development/interpreters/python/cpython/2.7/2.7.3-getpath-exe-extension.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/2.7.3-getpath-exe-extension.patch b/pkgs/development/interpreters/python/cpython/2.7/2.7.3-getpath-exe-extension.patch new file mode 100644 index 000000000000..68f6921ba6aa --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/2.7/2.7.3-getpath-exe-extension.patch @@ -0,0 +1,31 @@ +--- origsrc/Modules/getpath.c.orig 2012-11-27 12:07:56.098645900 -0500 ++++ src/Modules/getpath.c 2012-11-27 12:10:11.254895900 -0500 +@@ -436,6 +436,28 @@ + if (isxfile(progpath)) + break; + ++#ifdef __CYGWIN__ ++ /* ++ * Cygwin automatically removes the ".exe" extension from argv[0] ++ * to make programs feel like they are in a more Unix-like ++ * environment. Unfortunately, this can make it problemmatic for ++ * Cygwin to distinguish between a directory and an executable with ++ * the same name excluding the ".exe" extension. For example, the ++ * Cygwin Python build directory has a "Python" directory and a ++ * "python.exe" executable. This causes isxfile() to erroneously ++ * return false. If isdir() returns true and there is enough space ++ * to append the ".exe" extension, then we try again with the ++ * extension appended. ++ */ ++#define EXE ".exe" ++ if (isdir(progpath) && strlen(progpath) + strlen(EXE) <= MAXPATHLEN) ++ { ++ strcat(progpath, EXE); ++ if (isxfile(progpath)) ++ break; ++ } ++#endif /* __CYGWIN__ */ ++ + if (!delim) { + progpath[0] = '\0'; + break; |