[issue41965] distutils.spawn.find_executable() fails to find .py files on Windows

2020-10-07 Thread Steve Dower
Steve Dower added the comment: Yep, unless this directly impacts normal distutils usage, it's not going to be fixed (regardless of the formal deprecation proposal, we already have a policy of minimizing changes to distutils). You could submit a patch to Bugzilla to switch them to shutil.whic

[issue41965] distutils.spawn.find_executable() fails to find .py files on Windows

2020-10-07 Thread Eryk Sun
Eryk Sun added the comment: The existing behavior of find_executable() is unusual compared to a native Windows file search via CreateProcessW or SearchPathW, for which a default ".exe" extension is appended only if the executable name doesn't already have an extension. (CreateProcessW suppor

[issue41965] distutils.spawn.find_executable() fails to find .py files on Windows

2020-10-07 Thread Alexander Todorov
Alexander Todorov added the comment: @Eryk Sun, you are of course correct but still don't we need to handle this in Python? - find_executable() will search for rst2man.py.exe which doesn't exist so no good for the user - there is also no rst2man.exe which is probably an issue with how docuti

[issue41965] distutils.spawn.find_executable() fails to find .py files on Windows

2020-10-07 Thread Eryk Sun
Eryk Sun added the comment: The linked code runs subprocess.check_output([rstbin, path]), which won't work with "rst2man.py" in Windows. Reliably running a .py script in Windows requires running it explicitly via py[w].exe or python[w].exe, or via sys.executable from an existing Python proce

[issue41965] distutils.spawn.find_executable() fails to find .py files on Windows

2020-10-07 Thread Alexander Todorov
New submission from Alexander Todorov : As part of installing python-bugzilla via pip it searches for `rst2man` or `rst2man.py`, see: https://github.com/python-bugzilla/python-bugzilla/blob/master/setup.py#L81 on Windows venvs there is venv\Scripts\rst2man.py (no .exe or without suffix) and w