René's URL Explorer Experiment


Title: build-details.json is incorrect when using ./configure --with-build-python on a non-cross build · Issue #140266 · python/cpython · GitHub

Open Graph Title: build-details.json is incorrect when using ./configure --with-build-python on a non-cross build · Issue #140266 · python/cpython

X Title: build-details.json is incorrect when using ./configure --with-build-python on a non-cross build · Issue #140266 · python/cpython

Description: Bug report Bug description: We noticed that python-build-standalone's build-details.json contains "platform": "" on non-cross builds. I think I know why. For consistency (I think), python-build-standalone always uses ./configure --with-b...

Open Graph Description: Bug report Bug description: We noticed that python-build-standalone's build-details.json contains "platform": "" on non-cross builds. I think I know why. For consistency (I think), python-build-sta...

X Description: Bug report Bug description: We noticed that python-build-standalone's build-details.json contains "platform": "" on non-cross builds. I think I know why. For consistency (I ...

Opengraph URL: https://github.com/python/cpython/issues/140266

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"build-details.json is incorrect when using ./configure --with-build-python on a non-cross build","articleBody":"# Bug report\n\n### Bug description:\n\nWe noticed that python-build-standalone's build-details.json contains `\"platform\": \"\"` on non-cross builds.\n\nI think I know why. For consistency (I think), python-build-standalone always uses `./configure --with-build-python` on both cross builds and normal builds.\n\nThis causes configure.ac to do\n```sh\n    PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) _PYTHON_SYSCONFIGDATA_PATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`) '$with_build_python\n```\n\n(line 167 in 3.15.0a1), as opposed to `PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'` in the without-build-python case.\n\nHowever, `$_PYTHON_HOST_PLATFORM` is only actually _set_ to something in the cross-compile case (line 820 in 3.15.0a1), meaning that `$PYTHON_FOR_BUILD` is effectively doing `_PYTHON_HOST_PLATFORM= python3`.\n\nThe fact that this variable is an empty string, in turn, causes `sysconfig.get_platform()` to return an empty string:\n\n```\n$ uvx python3.15\nPython 3.15.0a1 (main, Oct 14 2025, 21:28:08) [Clang 20.1.4 ] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import sysconfig\n>>> sysconfig.get_platform()\n'linux-x86_64'\n>>> import os\n>>> os.environ['_PYTHON_HOST_PLATFORM'] = ''\n>>> sysconfig.get_platform()\n''\n```\n\nwhich makes generate-build-details.py output an empty string.\n\nArguably this is two bugs: configure.ac should not set `_PYTHON_HOST_PLATFORM` to an empty string, and sysconfig should not misbehave if `_PYTHON_HOST_PLATFORM` is set to an empty string (and should treat that as equivalent to being unset). Or maybe only one of these is a bug and the other is intended behavior. Also, of course, generate-build-details.py could work around this itself. I'm happy to provide a PR for any or all of these given some feedback on which direction to take this.\n\nThis applies to 3.14+ (all versions with build-details.json). If it's helpful, here are our full build logs for [3.14](https://github.com/astral-sh/python-build-standalone/actions/runs/18510022224/job/52748664133) and [3.15](https://github.com/astral-sh/python-build-standalone/actions/runs/18510022224/job/52748664126) in GHA; expand the \"Build\" section and search for `generate-build-details`. I've patched generate-build-details.py with `print(f\"generate-build-details debug: {sysconfig=} {sysconfig.get_platform()=}\", file=sys.stderr)`.\n\n(FYI I am probably about to file another bug about build-details.json generation in a moment, which might have a related cause and influence what the fix should be. EDIT: was already reported, #136267, left some analysis there)\n\n### CPython versions tested on:\n\n3.14\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-142375\n* gh-161530\n* gh-162373\n* gh-162374\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/geofft","@type":"Person","name":"geofft"},"datePublished":"2025-10-17T17:53:45Z","url":"https://github.com/python/cpython/issues/140266"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eb8d1dce-e33f-e8f2-3e0e-a84af52892a6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8342:3DD488:362B16C:44E1F51:6B01EC1B
html-safe-noncec826ec5fc56a358c800cd937c40035b169ea9b572b986ae7d3d35e20b093b8fb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzQyOjNERDQ4ODozNjJCMTZDOjQ0RTFGNTE6NkIwMUVDMUIiLCJ2aXNpdG9yX2lkIjoiNjMzMjU5NTc1ODM1Njg4NDUwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac321e5c967b6198ba5bbb934916b22fbb708fd56fa5dd14e6c3a15a0e9c210080
hovercard-subject-tagissue:3527016221
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/140266/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ee4ed23a7fa23158c4de64f276701e1d9249dec417b5a532d6f4d969a0a74d71/python/cpython/issues/140266
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ee4ed23a7fa23158c4de64f276701e1d9249dec417b5a532d6f4d969a0a74d71/python/cpython/issues/140266
og:image:altBug report Bug description: We noticed that python-build-standalone's build-details.json contains "platform": "" on non-cross builds. I think I know why. For consistency (I think), python-build-sta...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegeofft
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/140266#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F140266
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F140266
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/140266
Reloadhttps://github.com/python/cpython/issues/140266
Reloadhttps://github.com/python/cpython/issues/140266
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/140266
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/140266
zanieb/cpython#44https://github.com/zanieb/cpython/pull/44
build-details.json is incorrect when using ./configure --with-build-python on a non-cross buildhttps://github.com/python/cpython/issues/140266#top
zanieb/cpython#44https://github.com/zanieb/cpython/pull/44
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/geofft
geoffthttps://github.com/geofft
on Oct 17, 2025https://github.com/python/cpython/issues/140266#issue-3527016221
3.14https://github.com/astral-sh/python-build-standalone/actions/runs/18510022224/job/52748664133
3.15https://github.com/astral-sh/python-build-standalone/actions/runs/18510022224/job/52748664126
#136267https://github.com/python/cpython/issues/136267
gh-140266: Fix empty platform in build-details.json when using --with-build-python #142375https://github.com/python/cpython/pull/142375
gh-140266: Only pass _PYTHON_HOST_PLATFORM when cross compiling #161530https://github.com/python/cpython/pull/161530
[3.15] gh-140266: Only pass _PYTHON_HOST_PLATFORM when cross compiling (GH-161530) #162373https://github.com/python/cpython/pull/162373
[3.14] gh-140266: Only pass _PYTHON_HOST_PLATFORM when cross compiling (GH-161530) #162374https://github.com/python/cpython/pull/162374
geoffthttps://github.com/geofft
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Oct 17, 2025https://github.com/python/cpython/issues/140266#event-20349709671
sergey-miryanovhttps://github.com/sergey-miryanov
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
on Oct 17, 2025https://github.com/python/cpython/issues/140266#event-20349955247
https://github.com/Krishna-web-hub
Krishna-web-hubhttps://github.com/Krishna-web-hub
on Dec 6, 2025https://github.com/python/cpython/issues/140266#issuecomment-3620464459
@geoffthttps://github.com/geofft
https://github.com/picnixz
picnixzhttps://github.com/picnixz
on Dec 6, 2025https://github.com/python/cpython/issues/140266#issuecomment-3620496237
#136267https://github.com/python/cpython/issues/136267
https://github.com/Krishna-web-hub
Krishna-web-hubhttps://github.com/Krishna-web-hub
on Dec 6, 2025https://github.com/python/cpython/issues/140266#issuecomment-3621068790
@picnixzhttps://github.com/picnixz
#136267https://github.com/python/cpython/issues/136267
#140266https://github.com/python/cpython/issues/140266
#136267https://github.com/python/cpython/issues/136267
#140266https://github.com/python/cpython/issues/140266
https://github.com/picnixz
picnixzhttps://github.com/picnixz
on Dec 6, 2025https://github.com/python/cpython/issues/140266#issuecomment-3621272566
@AA-Turnerhttps://github.com/AA-Turner
Krishna-web-hubhttps://github.com/Krishna-web-hub
on Dec 6, 2025https://github.com/python/cpython/issues/140266#event-21405538971
Fix build-details platform handling and adjust traceback test(fixes p…https://github.com/Krishna-web-hub/cpython/commit/7e29c1c1f1ec507632c1ce986b2ed638ded56c40
p…https://github.com/python/cpython/issues/140266
https://docs.github.com/articles/closing-issues-via-commit-messages
7e29c1chttps://github.com/Krishna-web-hub/cpython/commit/7e29c1c1f1ec507632c1ce986b2ed638ded56c40
Fix build-details platform handling and adjust traceback test(fixes p…https://github.com/Krishna-web-hub/cpython/commit/b92000eda1fd1f7ec7f6c2eb6c5deba68e101205
p…https://github.com/python/cpython/issues/140266
https://docs.github.com/articles/closing-issues-via-commit-messages
b92000ehttps://github.com/Krishna-web-hub/cpython/commit/b92000eda1fd1f7ec7f6c2eb6c5deba68e101205
https://github.com/Krishna-web-hub
Krishna-web-hubhttps://github.com/Krishna-web-hub
on Dec 7, 2025https://github.com/python/cpython/issues/140266#issuecomment-3621847514
#142375https://github.com/python/cpython/pull/142375
@AA-Turnerhttps://github.com/AA-Turner
https://github.com/picnixz
picnixzhttps://github.com/picnixz
on Dec 7, 2025https://github.com/python/cpython/issues/140266#issuecomment-3621862342
Krishna-web-hubhttps://github.com/Krishna-web-hub
on Mar 5, 2026https://github.com/python/cpython/issues/140266#event-23293044522
pythongh-140266: Fix data race when accessing func_code in PyFunction…https://github.com/Krishna-web-hub/cpython/commit/d7c99b09db6e65f1608b1a02f72ea36416df61a1
pythongh-140266https://github.com/python/cpython/issues/140266
d7c99b0https://github.com/Krishna-web-hub/cpython/commit/d7c99b09db6e65f1608b1a02f72ea36416df61a1
https://github.com/manueljacob
manueljacobhttps://github.com/manueljacob
on Apr 7, 2026https://github.com/python/cpython/issues/140266#issuecomment-4195977667
cpython/Tools/build/check_extension_modules.pyhttps://github.com/python/cpython/blob/8a73478fedaee54a409f1933ff8f50c3a6fdf883/Tools/build/check_extension_modules.py#L112
8a73478https://github.com/python/cpython/commit/8a73478fedaee54a409f1933ff8f50c3a6fdf883
itamarohttps://github.com/itamaro
on Nov 7, 2026https://github.com/python/cpython/issues/140266#event-35414950756
pythongh-140266: Only pass _PYTHON_HOST_PLATFORM when cross compilinghttps://github.com/itamaro/cpython/commit/c7bf53b4d659f6838c3f11044034e139cf01f939
pythongh-140266https://github.com/python/cpython/issues/140266
c7bf53bhttps://github.com/itamaro/cpython/commit/c7bf53b4d659f6838c3f11044034e139cf01f939
kushaldashttps://github.com/kushaldas
on Nov 21, 2026https://github.com/python/cpython/issues/140266#event-36849996574
Merge branch 'main' into pythongh-140266-host-platform-cross-onlyhttps://github.com/itamaro/cpython/commit/36627ed831a69a1ccd76d81659e37c5452ccf532
pythongh-140266https://github.com/python/cpython/issues/140266
36627edhttps://github.com/itamaro/cpython/commit/36627ed831a69a1ccd76d81659e37c5452ccf532
gh-140266: Only pass _PYTHON_HOST_PLATFORM when cross compiling (#161530https://github.com/python/cpython/commit/91c4c6b8270478a6ef89cd0cb36d42c50495350c
gh-140266https://github.com/python/cpython/issues/140266
#161530https://github.com/python/cpython/pull/161530
91c4c6bhttps://github.com/python/cpython/commit/91c4c6b8270478a6ef89cd0cb36d42c50495350c
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/140266
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/140266
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.