Open Holt59 opened 3 months ago
Why this should be required behaviour?
Why this should be required behaviour?
Because otherwise the script wrappers do not work? What would be the alternative?
Currently it is simply impossible to install script wrappers via pip
using a Python debug build, which I do not think is ideal.
This would also make the behavior consistent with setuptools
since python setup.py install
does generate wrappers using python_d.exe
.
Because otherwise the script wrappers do not work
Well I understand that, but why is there a need to support scripts to be run under debug builds of Python? Obviously you can't ship such scripts. Can you give a more detailed explanation of the actual use case?
Because otherwise the script wrappers do not work
Well I understand that, but why is there a need to support scripts to be run under debug builds of Python? Obviously you can't ship such scripts. Can you give a more detailed explanation of the actual use case?
You cannot ship such scripts, but I do not see a reason not to be able to run such scripts. AFAIK, you cannot ship the scripts installed (through pip install
) with a standard Python installation since it tries to use the absolute path from the executable (at least that was I guess from the error).
Aside from the required work to implement such feature, what would justify not having the scripts use python_d.exe
instead of python.exe
?
My actual use-case is to build PyQt using sip and related tools. Building those in debug mode requires a Python debug installation, and it makes use of scripts generated by the sip
package (sip-install
, sip-module
, ...). These scripts work fine if installed through the old deprecated setuptools method (python setup.py install
) but not through pip
, hence the issue.
I consider this a niche use case, but I'm willing to review a PR around this which meets your requirement while using a simple approach.
Describe the bug
When installing a package containing script wrappers from
setuptools
using a debug installation of Python on Windows, the script wrappers do not point to the rightpython_d.exe
.This is a follow-up from https://github.com/pypa/setuptools/issues/4418
To Reproduce
python_d.exe -m pip install XXX
. Below is non-working package:test_python_debug_main.exe
.Expected behavior
The script wrappers should use the right executable, i.e.,
python_d.exe
.Environment