classification
Title: .exe is appended to python executable based on filesystem case insensitivity
Type: Stage: resolved
Components: Build Versions: Python 3.6, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ammar2, martin.panter
Priority: normal Keywords:

Created on 2016-07-27 06:41 by ammar2, last changed 2016-07-27 07:36 by eryksun. This issue is now closed.

Messages (3)
msg271436 - (view) Author: Ammar Askar (ammar2) * (Python triager) Date: 2016-07-27 06:41
I encountered some odd behavior today, I compiled python inside VirtualBox, however, I compiled it inside a shared folder. The OS outside of VirtualBox is Windows, so the shared folder naturally is case-insensitive. The actual virtual OS is Debian Linux. Upon running make, I found that oddly enough the executable created was called `python.exe`. Running `make install` still installs it to the correct python name.

I did some digging around and from what I can tell this is the change that makes the built python executable have an exe extension or not depending on file system case insensitivity. 

https://hg.python.org/cpython/rev/d64dfbdc5f8c

It's from way long ago from 2001 and I can't figure out why exactly this change was made. The commit message hints that it has something to do with Mac's file system. I asked a friend who used MacOS back then and he reports that it had no file extensions back then either. As far as I know, the only OS that really requires file extension is windows, and besides, this exact situation is what the https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html variable is for, which is used in the configure.ac file already.

It seems a little odd that whether or not to put .exe in the build executable is based on file system case insensitivity.
msg271437 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-07-27 06:52
My guess is it was to avoid a conflict between the “Python/” source directory, and the “./python” executable that may be built in the same directory. Wouldn’t that be a problem in your case too?
msg271438 - (view) Author: Ammar Askar (ammar2) * (Python triager) Date: 2016-07-27 06:56
Aah, you're completely correct. Renaming it to python and doing ./python causes it to confuse it with the directory. Sorry.
History
Date User Action Args
2016-07-27 07:36:39eryksunsetstage: resolved
2016-07-27 06:56:19ammar2setstatus: open -> closed
resolution: not a bug
messages: + msg271438
2016-07-27 06:52:57martin.pantersetnosy: + martin.panter
messages: + msg271437
2016-07-27 06:41:51ammar2create