You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
Proposal
I would like to add minimal platform identification for OpenHarmony under the Unsupported platform category in PEP 11, while keeping the maintenance cost as low as possible. This is not a request for Tier 3 support.
The initial scope is to:
Provide the <arch>-linux-ohos platform triplet and the ohos-<api_level>-<arch> sysconfig platform tag.
Support native compilation and cross-compilation.
Target the three architectures supported by the OpenHarmony SDK: aarch64, arm, and x86_64.
The 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.
Implementation
I have prepared a complete implementation in the ohos branch of my fork 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.
The related platform patches have also been validated through automated builds and smoke tests in ohos-python, a downstream project I maintain.
Follow-up
Tier 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.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Activity
pythongh-162319: Add OpenHarmony platform identifiers
pythongh-162319: Add OpenHarmony API-aware platform tags and version …
pythongh-162319: Add OpenHarmony API-aware platform tags and version …
pythongh-162319: Add OpenHarmony API-aware platform tags and version …
[-]Add OpenHarmony platform identifiers[/-][+]Add OpenHarmony platform identifiers and API level support[/+][-]Add OpenHarmony platform identifiers and API level support[/-][+]Add OpenHarmony platform identifiers[/+]pythongh-162319: Add OpenHarmony API-aware platform tags and version …