Title: Add OpenHarmony platform identifiers · Issue #162319 · python/cpython · GitHub
Open Graph Title: Add OpenHarmony platform identifiers · Issue #162319 · python/cpython
X Title: Add OpenHarmony platform identifiers · Issue #162319 · python/cpython
Description: Background OpenHarmony is an open-source operating system running on devices such as PCs, tablets, and embedded systems. Many developers are already porting CPython and third-party libraries to OpenHarmony. These porters and library main...
Open Graph Description: Background OpenHarmony is an open-source operating system running on devices such as PCs, tablets, and embedded systems. Many developers are already porting CPython and third-party libraries to Ope...
X Description: Background OpenHarmony is an open-source operating system running on devices such as PCs, tablets, and embedded systems. Many developers are already porting CPython and third-party libraries to Ope...
Opengraph URL: https://github.com/python/cpython/issues/162319
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add OpenHarmony platform identifiers","articleBody":"### Background\n\n[OpenHarmony](https://www.openharmony.cn/) is an open-source operating system running on devices such as PCs, tablets, and embedded systems.\n\nMany developers are already porting CPython and third-party libraries to OpenHarmony. These porters and library maintainers need a shared set of OpenHarmony platform identifiers. Different names in different ports would make it harder for third-party packages to support the platform consistently.\n\n### Proposal\n\nI would like to add minimal platform identification for OpenHarmony under the Unsupported platform category in [PEP 11](https://peps.python.org/pep-0011/), while keeping the maintenance cost as low as possible. This is not a request for Tier 3 support.\n\nThe initial scope is to:\n\n- Provide the `\u003carch>-linux-ohos` platform triplet and the `ohos-\u003carch>` sysconfig platform tag.\n- Support native compilation and cross-compilation.\n- Target the three architectures supported by the OpenHarmony SDK: aarch64, arm, and x86_64.\n\nThe main benefit is not just making one CPython port build. It is establishing common identifiers so that different ports and third-party libraries can handle OpenHarmony consistently.\n\n### Implementation\n\nI have prepared a complete implementation in the [ohos branch of my fork](https://github.com/hqzing/cpython/tree/ohos) and will use it for the PR. CPython's main development branch builds successfully in an OpenHarmony environment, and both `test_sysconfig` and `patchcheck` pass.\n\nThe related platform patches have also been validated through automated builds and smoke tests in [ohos-python](https://github.com/ohos-python/ohos-python), a downstream project I maintain.\n\n### Follow-up\n\nI am also a maintainer of [Harmonybrew](https://atomgit.com/Harmonybrew), a Homebrew port for OpenHarmony, where I work on package ports and build infrastructure. This experience is relevant to porting and maintaining CPython for OpenHarmony and provides a foundation for a possible future Tier 3 effort for `aarch64-unknown-linux-ohos`.\n\nTier 3 is a larger goal that may require a longer implementation period. It should be handled as a separate effort, not as part of this round of work. If the CPython community wants to pursue it later, I can join that discussion separately.\n\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-162322\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/hqzing","@type":"Person","name":"hqzing"},"datePublished":"2026-11-20T12:28:05Z","url":"https://github.com/python/cpython/issues/162319"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6b907c98-e831-bada-f9cd-e76d35b12b6a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6C4:97D39:9C55AD:CEBB37:6B01E944 |
| html-safe-nonce | 99cc4c95ffec8e0d37650a02ddb2ee6d7636b16af9306a3520ea9011f87245c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkM0Ojk3RDM5OjlDNTVBRDpDRUJCMzc6NkIwMUU5NDQiLCJ2aXNpdG9yX2lkIjoiMzkwMjExNzk3MzY0ODg2MTUwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5f3e7ecd3466edf1a2dab4b8515d8949adc2726b6f136873c8b95ad62752d060 |
| hovercard-subject-tag | issue:6511406613 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/162319/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b72504b2744101909ab4f2b0993d2dc07d06bf7fe5170ea9aec10f0f485b13f/python/cpython/issues/162319 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b72504b2744101909ab4f2b0993d2dc07d06bf7fe5170ea9aec10f0f485b13f/python/cpython/issues/162319 |
| og:image:alt | Background OpenHarmony is an open-source operating system running on devices such as PCs, tablets, and embedded systems. Many developers are already porting CPython and third-party libraries to Ope... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hqzing |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width