Title: Expose SOABI setting in the header
Type: enhancement Stage: resolved
Components: C API Versions:
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mathstuf, ned.deily, vstinner
Priority: normal Keywords:

Created on 2019-12-16 13:52 by mathstuf, last changed 2019-12-17 01:26 by mathstuf. This issue is now closed.

Messages (3)
msg358489 - (view) Author: Ben Boeckel (mathstuf) Date: 2019-12-16 13:52
Currently, the SOABI suffix is only available by running the Python interpreter to ask `sysconfig` about the setting. This complicates cross compilation because the target platform's Python may not be runnable on the build platform. Exposing this in the header would allow for build processes to know what suffix to add to modules without having to run the interpreter.
msg358527 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-12-17 00:32
The entire extension suffix is currently available from the pythonX.Y-config command which does not depend on a running interpreter (on Linux systems at least), for example:

$ python3.8-config --extension-suffix

Is that not sufficient for your needs?
msg358529 - (view) Author: Ben Boeckel (mathstuf) Date: 2019-12-17 01:26
Ah, that does look like it is suitable (since it is a shell script). I assume it is a batch script on Windows (though I feel cross-compilation is far rarer there). Thanks.
Date User Action Args
2019-12-17 01:26:56mathstufsetstatus: open -> closed

messages: + msg358529
stage: resolved
2019-12-17 00:32:18ned.deilysetnosy: + ned.deily
messages: + msg358527
2019-12-16 13:55:41xtreaksetnosy: + vstinner
2019-12-16 13:52:16mathstufcreate