Skip to content

Commit d4ba7e0

Browse files
authored
Merge pull request #147 from robotpy/2027-upgrades
Initial systemcore support
2 parents 1caa561 + d086b83 commit d4ba7e0

File tree

15 files changed

+471
-557
lines changed

15 files changed

+471
-557
lines changed

.github/workflows/dist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ on:
66
push:
77
branches:
88
- main
9+
- '2027'
910
tags:
1011
- '*'
1112

1213
jobs:
1314
ci:
14-
uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2025
15+
uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2027
1516
with:
1617
enable_sphinx_check: false
1718
secrets:

robotpy_installer/_pipstub.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,41 @@
22
# This hacks around pip's lack of support for supporting environment markers
33
# when specifying --platform/--abi/--implementation etc
44
#
5+
# In principle we could just directly patch pip on the robot but that
6+
# has its own share of downsides so we just do this instead
7+
#
58

69
import platform
710
import runpy
811
import sysconfig
912
import os
1013
import sys
1114

15+
# TODO: better detection needed to ensure we only run this on systemcore
16+
# but this is fine for now?
17+
if sysconfig.get_platform() == "linux-aarch64":
18+
try:
19+
import pip._vendor.packaging.tags as tags
20+
21+
def platform_tags():
22+
for i in reversed(range(17, 38)):
23+
yield f"manylinux_2_{i}_aarch64"
24+
25+
yield "linux_systemcore"
26+
yield "linux_aarch64"
27+
28+
tags.platform_tags = platform_tags
29+
30+
except ImportError:
31+
pass
32+
1233

1334
if __name__ == "__main__":
14-
# Setup environment for what the RoboRIO python would have
35+
# Setup environment for what the SystemCore python would have
1536
# -> strictly speaking we only care about platform.machine as that's what
1637
# we're using in robotpy-meta, but the rest for completeness
17-
sysconfig.get_platform = lambda: "linux_roborio"
18-
platform.machine = lambda: "roborio"
38+
sysconfig.get_platform = lambda: "linux-systemcore"
39+
platform.machine = lambda: "systemcore"
1940
platform.python_implementation = lambda: "CPython"
2041
platform.system = lambda: "Linux"
2142
platform.python_version = lambda: "3.13.0"

0 commit comments

Comments
 (0)