Visitar URL original
The readme claims macos creates `python.exe` =) · Issue #93137 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20230608113008/https://github.com/python/cpython/issues/93137
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The readme claims macos creates python.exe =) #93137

Closed
Pomax opened this issue May 23, 2022 · 5 comments
Closed

The readme claims macos creates python.exe =) #93137

Pomax opened this issue May 23, 2022 · 5 comments
Labels
docs Documentation in the Doc dir

Comments

@Pomax
Copy link

Pomax commented May 23, 2022

The readme currently reads:

You can pass many options to the configure script; run ./configure --help to find out more. On macOS case-insensitive file systems and on Cygwin, the executable is called python.exe; elsewhere it's just python.

However, this implies that macos will built a python.exe, which is almost certainly not the case ;)

@Pomax Pomax added the docs Documentation in the Doc dir label May 23, 2022
@JelleZijlstra
Copy link
Member

The text is correct.

jelle@mbpt-root cpython % ./python.exe 
Python 3.11.0b1 (tags/v3.11.0b1:8d32a5c8c4, May 21 2022, 21:04:18) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

@JelleZijlstra JelleZijlstra closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2022
@Pomax
Copy link
Author

Pomax commented May 24, 2022

Oh wow, that's amazing. MacOS is a BSD variant, so that shouldn't have an .exe extension?

@JelleZijlstra
Copy link
Member

I'm not sure why it's done this way (or even if it's CPython-specific, I don't compile too many other things from source on my Mac). Maybe someone else can come along with more backgroun.

@zware
Copy link
Member

zware commented May 24, 2022

They key words there are "case-insensitive file systems". On such file systems, the built binary needs an extension to differentiate from the Python/ directory. There's nothing wrong with .exe on macOS or other platforms, and .exe is the natural choice on Cygwin (and only choice on Windows), so it might as well be be used for consistency. It doesn't have to be .exe; you could just as well mv python.exe python.somethingelse and macOS will happily let you run ./python.somethingelse.

@ned-deily
Copy link
Member

ned-deily commented May 24, 2022 •

They key words there are "case-insensitive file systems".

Yes, the factory-installed macOS file systems have always been case-insensitive. However, it has long been possible to create and re-install macOS on a case-sensitive file system or, for that matter, create a separate case-sensitive volume and build Python there, in which case, ./configure will create the python executable as python, not python.exe. However it is not possible to change an existing file system volume from case-insensitive to case-sensitive so attempting to change your macOS system to be case-sensitive is not for the faint of heart and not recommended by Apple. (The good news is that this is something you normally only have to go through once per Mac but it can be quite an undertaking. FWIW, I've used case-sensitive file systems on my development Macs for years.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

4 participants