setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Add options for Python with Precompiled stdlib and debug binaries

Open simonsan opened this issue 5 years ago • 3 comments

I wonder if it would be viable to give a parameter for advanced usages in this action. For example I need this exact setup as in the title.

LINK : fatal error LNK1104: cannot open file 'python38_d.lib' We need a Python interpreter that is shipped with libpython and header files.

Since ever I need to download the Python setup and deinstall with it the same version from the CI just to install with the following command:

setup.exe /quiet Include_debug=1 Include_dev=1 Include_lib=1 Include_pip=1 PrependPath=1 CompileAll=1 InstallAllUsers=1 TargetDir=<workspace-dir>\Python38-x64-dbg\

Would be really cool to see such options here as well, so I (we?) can easily setup the Python installation for a build matrix for example.

cc: actions/virtual-environments#786 cc: actions/setup-python#85 cc: actions/python-versions#16

simonsan avatar Apr 26 '20 21:04 simonsan

I suggest everyone who has a choice try this workaround (from https://bugs.python.org/issue23393) because a debug build on Windows requires that all of your modules containing native code be built in debug mode too.

mmomtchev avatar Nov 03 '22 18:11 mmomtchev

xref capi-workgroup/problems#36 where interest was expressed by the CPython core developer team around making it easier to test c-extensions against debug versions of python, which would enable things like assert checks, and checks for improper use of the C-API.

mattip avatar Jun 15 '23 08:06 mattip

I think this would require:

  • adding a way to specify debug builds in the UI for the action
  • adding debug tarballs to https://github.com/actions/python-versions/releases

mattip avatar Jun 15 '23 08:06 mattip