René's URL Explorer Experiment


Title: gh-162319: Add OpenHarmony platform identifiers by hqzing · Pull Request #162322 · python/cpython · GitHub

Open Graph Title: gh-162319: Add OpenHarmony platform identifiers by hqzing · Pull Request #162322 · python/cpython

X Title: gh-162319: Add OpenHarmony platform identifiers by hqzing · Pull Request #162322 · python/cpython

Description: Closes #162319. Background This PR adds basic build support for the OpenHarmony platform. The OpenHarmony standard system uses a Linux kernel (or a Linux-compatible kernel) but not the GNU userland. This architecture is similar to Android, so this PR follows CPython's existing Android platform handling where applicable: *-*-linux-android* is identified as Linux-android, with MACHDEP=android. *-*-linux-ohos* is identified as Linux-ohos, with MACHDEP=ohos. This preserves the existing Linux platform logic while providing the platform identity required for OpenHarmony, including its wheel platform tags. The linux-ohos identifier is not an arbitrary name introduced by this PR. It follows the target triple assigned to OpenHarmony by the LLVM toolchain: -unknown-linux-ohos (shorthand: -linux-ohos). Changes Detect native OpenHarmony builds through the __OHOS__ macro in config.guess, following the existing Android pattern. Recognize *-*-linux-ohos* in both native and cross-compilation paths in configure.ac. Set ac_sys_system=Linux-ohos and MACHDEP=ohos, resulting in sys.platform == "ohos". Add the -linux-ohos platform triplet to Misc/platform_triplet.c. Update sysconfig.get_platform() and related tests. Add ohos for OpenHarmony to the platform table in Doc/library/sys.rst. Update CPython's bundled config.sub to accept linux-ohos. This change was backported from GNU config commit 5d8be4275fe9066e3322386213120e1d93af6020. Regenerate the configure-related files. No existing branches for other platforms are changed. Scope This PR targets the three architectures supported by the OpenHarmony SDK: aarch64, arm, and x86_64. Native compilation is detected automatically by config.guess, so no explicit target triple is required: ./configure # Equivalent to: # ./configure \ # --build=aarch64-unknown-linux-ohos \ # --host=aarch64-unknown-linux-ohos For cross-compilation, explicitly specify the target triple and provide the build machine's triple and --with-build-python as required by CPython: ./configure \ --build= \ --host=aarch64-unknown-linux-ohos \ --with-build-python= Testing I built CPython's main branch natively on aarch64 OpenHarmony and verified: sys.platform == "ohos". sysconfig.get_platform() == "ohos-aarch64". test_sysconfig passes. I also ran the full test suite in the same environment: 446 test modules passed and 14 failed. These failures involve platform and libc differences and are outside the scope of this PR. I do not have devices for arm and x86_64, so those two architectures have not been validated. Issue: gh-162319

Open Graph Description: Closes #162319. Background This PR adds basic build support for the OpenHarmony platform. The OpenHarmony standard system uses a Linux kernel (or a Linux-compatible kernel) but not the GNU userland...

X Description: Closes #162319. Background This PR adds basic build support for the OpenHarmony platform. The OpenHarmony standard system uses a Linux kernel (or a Linux-compatible kernel) but not the GNU userland...

Opengraph URL: https://github.com/python/cpython/pull/162322

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e5123c30-58df-ae15-a131-8fcdf5a43377
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA430:31D532:12DF013:1914EC2:6B01EFB5
html-safe-nonceeb4ae5f8930fad17791e5a689af34546382d681539d541072316237427512788
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDMwOjMxRDUzMjoxMkRGMDEzOjE5MTRFQzI6NkIwMUVGQjUiLCJ2aXNpdG9yX2lkIjoiMzA5Nzk1MTE2NjgyNDQwNjI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6015ad872289009b92e75c56ea22a6d31fcfb00eb785e9ffb7e86ee981496afe
hovercard-subject-tagpull_request:5413458786
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/162322/files
twitter:imagehttps://avatars.githubusercontent.com/u/22612509?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/22612509?s=400&v=4
og:image:altCloses #162319. Background This PR adds basic build support for the OpenHarmony platform. The OpenHarmony standard system uses a Linux kernel (or a Linux-compatible kernel) but not the GNU userland...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
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

Links:

Skip to contenthttps://github.com/python/cpython/pull/162322/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F162322%2Ffiles
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%2Fpull%2F162322%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/162322/files
Reloadhttps://github.com/python/cpython/pull/162322/files
Reloadhttps://github.com/python/cpython/pull/162322/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
hqzinghttps://github.com/hqzing
python:mainhttps://github.com/python/cpython/tree/main
hqzing:ohoshttps://github.com/hqzing/cpython/tree/ohos
Conversation 2 https://github.com/python/cpython/pull/162322
Commits 1 https://github.com/python/cpython/pull/162322/commits
Checks 58 https://github.com/python/cpython/pull/162322/checks
Files changed https://github.com/python/cpython/pull/162322/files
Please reload this pagehttps://github.com/python/cpython/pull/162322/files
gh-162319: Add OpenHarmony platform identifiers https://github.com/python/cpython/pull/162322/files#top
Show all changes 1 commit https://github.com/python/cpython/pull/162322/files
4e0ade7 gh-162319: Add OpenHarmony platform identifiers hqzing Nov 19, 2026 https://github.com/python/cpython/pull/162322/commits/4e0ade7c499329ef0e65a28e86644d5ad64c5df2
Clear filters https://github.com/python/cpython/pull/162322/files
Please reload this pagehttps://github.com/python/cpython/pull/162322/files
Please reload this pagehttps://github.com/python/cpython/pull/162322/files
sys.rst https://github.com/python/cpython/pull/162322/files#diff-26fe9050845b6be0f74760ffe9095874cfe2dfec55c22b18e7dba58f3978a418
__init__.py https://github.com/python/cpython/pull/162322/files#diff-ff3de3c657b8e6d0d7071b2f0672c8a7b03c45b3176557a99fc39c7bdcb571b9
test_sysconfig.py https://github.com/python/cpython/pull/162322/files#diff-365f96442d242edc27cd09ce48da3cd6f81d1b47c9baf8f1b7bbbe5b1d2e7bda
2026-11-20-17-34-37.gh-issue-162319.OHOS01.rst https://github.com/python/cpython/pull/162322/files#diff-8f14ca2044c8456a7d243e2efd081852f0e617378f2b5ed95650c4591f2b7669
platform_triplet.c https://github.com/python/cpython/pull/162322/files#diff-84f2c0139db5f7237caa3f5147bc2e01a5206e706f16f5300c5bfffd0f8fcb78
config.guess https://github.com/python/cpython/pull/162322/files#diff-c07271c671a84c4d4722dfd1c933b502f71f9cd33c10f1ef04b2a72180af59bf
config.sub https://github.com/python/cpython/pull/162322/files#diff-9c966208fd0a0c8e24a1526da6904887c378283b9b645b9740c19339884174d9
configure https://github.com/python/cpython/pull/162322/files#diff-90d08e583c4c9c6f391b2ae90f819f600a6326928ea9512c9e0c6d98e9f29ac2
configure.ac https://github.com/python/cpython/pull/162322/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
Doc/library/sys.rsthttps://github.com/python/cpython/pull/162322/files#diff-26fe9050845b6be0f74760ffe9095874cfe2dfec55c22b18e7dba58f3978a418
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/Doc/library/sys.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162322/files#diff-26fe9050845b6be0f74760ffe9095874cfe2dfec55c22b18e7dba58f3978a418
https://github.com/python/cpython/pull/162322/files#diff-26fe9050845b6be0f74760ffe9095874cfe2dfec55c22b18e7dba58f3978a418
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L596
Lib/sysconfig/__init__.pyhttps://github.com/python/cpython/pull/162322/files#diff-ff3de3c657b8e6d0d7071b2f0672c8a7b03c45b3176557a99fc39c7bdcb571b9
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/Lib/sysconfig/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162322/files#diff-ff3de3c657b8e6d0d7071b2f0672c8a7b03c45b3176557a99fc39c7bdcb571b9
https://github.com/python/cpython/pull/162322/files#diff-ff3de3c657b8e6d0d7071b2f0672c8a7b03c45b3176557a99fc39c7bdcb571b9
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L596
Lib/test/test_sysconfig.pyhttps://github.com/python/cpython/pull/162322/files#diff-365f96442d242edc27cd09ce48da3cd6f81d1b47c9baf8f1b7bbbe5b1d2e7bda
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/Lib/test/test_sysconfig.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162322/files#diff-365f96442d242edc27cd09ce48da3cd6f81d1b47c9baf8f1b7bbbe5b1d2e7bda
https://github.com/python/cpython/pull/162322/files#diff-365f96442d242edc27cd09ce48da3cd6f81d1b47c9baf8f1b7bbbe5b1d2e7bda
https://github.com/python/cpython/pull/162322/files#diff-365f96442d242edc27cd09ce48da3cd6f81d1b47c9baf8f1b7bbbe5b1d2e7bda
https://github.com/python/cpython/pull/162322/files#diff-365f96442d242edc27cd09ce48da3cd6f81d1b47c9baf8f1b7bbbe5b1d2e7bda
Misc/NEWS.d/next/Build/2026-11-20-17-34-37.gh-issue-162319.OHOS01.rsthttps://github.com/python/cpython/pull/162322/files#diff-8f14ca2044c8456a7d243e2efd081852f0e617378f2b5ed95650c4591f2b7669
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/Misc/NEWS.d/next/Build/2026-11-20-17-34-37.gh-issue-162319.OHOS01.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
Misc/platform_triplet.chttps://github.com/python/cpython/pull/162322/files#diff-84f2c0139db5f7237caa3f5147bc2e01a5206e706f16f5300c5bfffd0f8fcb78
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/Misc/platform_triplet.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162322/files#diff-84f2c0139db5f7237caa3f5147bc2e01a5206e706f16f5300c5bfffd0f8fcb78
https://github.com/python/cpython/pull/162322/files#diff-84f2c0139db5f7237caa3f5147bc2e01a5206e706f16f5300c5bfffd0f8fcb78
config.guesshttps://github.com/python/cpython/pull/162322/files#diff-c07271c671a84c4d4722dfd1c933b502f71f9cd33c10f1ef04b2a72180af59bf
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/config.guess
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162322/files#diff-c07271c671a84c4d4722dfd1c933b502f71f9cd33c10f1ef04b2a72180af59bf
https://github.com/python/cpython/pull/162322/files#diff-c07271c671a84c4d4722dfd1c933b502f71f9cd33c10f1ef04b2a72180af59bf
config.subhttps://github.com/python/cpython/pull/162322/files#diff-9c966208fd0a0c8e24a1526da6904887c378283b9b645b9740c19339884174d9
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/config.sub
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162322/files#diff-9c966208fd0a0c8e24a1526da6904887c378283b9b645b9740c19339884174d9
https://github.com/python/cpython/pull/162322/files#diff-9c966208fd0a0c8e24a1526da6904887c378283b9b645b9740c19339884174d9
https://github.com/python/cpython/pull/162322/files#diff-9c966208fd0a0c8e24a1526da6904887c378283b9b645b9740c19339884174d9
https://github.com/python/cpython/pull/162322/files#diff-9c966208fd0a0c8e24a1526da6904887c378283b9b645b9740c19339884174d9
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L84
configurehttps://github.com/python/cpython/pull/162322/files#diff-90d08e583c4c9c6f391b2ae90f819f600a6326928ea9512c9e0c6d98e9f29ac2
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/configure
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/162322/files
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L84
configure.achttps://github.com/python/cpython/pull/162322/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
View file https://github.com/python/cpython/blob/4e0ade7c499329ef0e65a28e86644d5ad64c5df2/configure.ac
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162322/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162322/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
https://github.com/python/cpython/pull/162322/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
https://github.com/python/cpython/pull/162322/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
https://github.com/python/cpython/pull/162322/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
https://github.com/python/cpython/pull/162322/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
Please reload this pagehttps://github.com/python/cpython/pull/162322/files
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.