-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
gh-127405: Remove dead code in sysconfig._get_pybuilddir()
#131935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How can I add the "skip news" label? |
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.14 Maybe 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 |
Move to this approach. |
get_config_var('Py_DEBUG')
usage in sysconfig._get_pybuilddir()
sysconfig._get_pybuilddir()
@@ -161,10 +161,7 @@ def _print_config_dict(d, stream): | |||
|
|||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any way for this to be called, but I note that this behavior is tied to
Line 216 in e9556e1
pydebug = lib_dir.endswith("-pydebug") |
I think this aspect of the WASM build is broken, and if this code can be deleted then perhaps that trail can too.
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.abiflags
on Windows #127405