8000 gh-127405: Remove dead code in `sysconfig._get_pybuilddir()` by XuehaiPan · Pull Request #131935 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Try fix WASM build with Py_DEBUG"
This reverts commit 1a6b81b.
This reverts commit cb04312.
  • Loading branch information
XuehaiPan committed Apr 1, 2025
commit bc0c675d2df98c01f71b8bf3d1e18c0f85678ca4
9 changes: 8 additions & 1 deletion Lib/sysconfig/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ def _print_config_dict(d, stream):
print ("}", file=stream)


def _get_pybuilddir():
pybuilddir = f'build/lib.{get_platform()}-{get_python_version()}'
if get_config_var('Py_DEBUG'):
pybuilddir += '-pydebug'
return pybuilddir


def _get_json_data_name():
name = _get_sysconfigdata_name()
assert name.startswith('_sysconfigdata')
Expand Down Expand Up @@ -213,7 +220,7 @@ def _generate_posix_vars():
module.build_time_vars = vars
sys.modules[name] = module

pybuilddir = f'build/lib.{get_platform()}-{get_python_version()}'
pybuilddir = _get_pybuilddir()
os.makedirs(pybuilddir, exist_ok=True)
destfile = os.path.join(pybuilddir, name + '.py')

Expand Down
Loading
0