Uh oh!
There was an error while loading. Please reload this page.
gh-127405: Remove dead code in sysconfig._get_pybuilddir() - #131935
gh-127405: Remove dead code in sysconfig._get_pybuilddir()#131935XuehaiPan wants to merge 17 commits into
sysconfig._get_pybuilddir()#131935Conversation
XuehaiPan
commented
Mar 31, 2025
How can I add the "skip news" label? |
brianschubert
commented
Mar 31, 2025
Hmm, I think something might be outdated here. When I build with $ rm -r build
$ make clean && ./configure --with-pydebug --prefix=$(pwd)&& make -j
$ ./python -c 'import sysconfig; print(sysconfig.get_config_var("Py_DEBUG"))'
1
$ ls -l build total 16
drwxrwxr-x 3 brian brian 12288 Mar 31 09:17 lib.linux-x86_64-3.14
drwxrwxr-x 2 brian brian 4096 Mar 31 09:17 scripts-3.14Maybe the right fix is to remove that branch altogether?
If any user-facing behavior changes, there should be a news entry. Right now this PR changes where |
XuehaiPan
commented
Mar 31, 2025
Move to this approach. |
get_config_var('Py_DEBUG') usage in sysconfig._get_pybuilddir()sysconfig._get_pybuilddir()| def _get_pybuilddir(): | ||
| pybuilddir = f'build/lib.{get_platform()}-{get_python_version()}' | ||
| if get_config_var('Py_DEBUG') == '1': | ||
| pybuilddir += '-pydebug' |
There was a problem hiding this comment.
I don't see any way for this to be called, but I note that this behavior is tied to
Line 216 in e9556e1
I think this aspect of the WASM build is broken, and if this code can be deleted then perhaps that trail can too.
XuehaiPan
commented
Apr 1, 2025
The complexity of fixing the WASM build with the correct path is beyond what I expected. |
The return value for
get_config_var('Py_DEBUG')is one of0,1,None. It cannot be astr.sys.abiflagson Windows #127405