Skip to content

Commit 812f7fa

Browse files
committed
[GR-48161] Add supported platforms to multi-platform dir layout distributions.
PullRequest: graalpython/2945
2 parents a67aec1 + 668a7fc commit 812f7fa

File tree

2 files changed

+21
-38
lines changed

2 files changed

+21
-38
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def _get_stdlib_home():
158158
return os.path.join(SUITE.dir, "graalpython", "lib-python", "3")
159159

160160

161-
def _get_capi_home():
162-
return mx.distribution("GRAALPYTHON_NATIVE_LIBS").get_output()
161+
def _get_capi_home(args=None):
162+
return os.path.join(mx.distribution("GRAALPYTHON_NATIVE_LIBS").get_output(), mx.get_os(), mx.get_arch())
163163

164164

165165
_get_jni_home = _get_capi_home

mx.graalpython/suite.py

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -868,13 +868,8 @@
868868
"os_arch": {
869869
"windows": {
870870
"<others>": {
871-
"buildDependencies": [
872-
"com.oracle.graal.python.cext",
873-
"com.oracle.graal.python.jni",
874-
"com.oracle.graal.python.hpy.llvm"
875-
],
876871
"layout": {
877-
"./": [
872+
"<os>/<arch>/": [
878873
"dependency:com.oracle.graal.python.jni/*",
879874
"dependency:com.oracle.graal.python.cext/bin/*",
880875
"dependency:com.oracle.graal.python.hpy.llvm/bin/*",
@@ -884,17 +879,8 @@
884879
},
885880
"<others>": {
886881
"<others>": {
887-
"buildDependencies": [
888-
"com.oracle.graal.python.cext",
889-
"com.oracle.graal.python.jni",
890-
"python-libzsupport",
891-
"python-libposix",
892-
"python-libbz2",
893-
"python-liblzma",
894-
"com.oracle.graal.python.hpy.llvm"
895-
],
896882
"layout": {
897-
"./": [
883+
"<os>/<arch>/": [
898884
"dependency:com.oracle.graal.python.jni/*",
899885
"dependency:com.oracle.graal.python.cext/bin/*",
900886
"dependency:python-libzsupport/*",
@@ -907,6 +893,13 @@
907893
},
908894
},
909895
},
896+
"platforms": [
897+
"linux-amd64",
898+
"linux-aarch64",
899+
"darwin-amd64",
900+
"darwin-aarch64",
901+
"windows-amd64",
902+
],
910903
"description": "Contains the JNI native lib, the C API and support libs.",
911904
"maven": False,
912905
},
@@ -1147,11 +1140,6 @@
11471140
"fileListEntry": "META-INF/resources/include.files",
11481141
"type": "dir",
11491142
"description": "GraalVM Python header resources",
1150-
"buildDependencies": [
1151-
"GRAALPYTHON_NATIVE_LIBS",
1152-
"com.oracle.graal.python.cext",
1153-
"com.oracle.graal.python.hpy.llvm",
1154-
],
11551143
"layout": {
11561144
"./META-INF/resources/include/": [
11571145
"file:graalpython/com.oracle.graal.python.cext/include/*",
@@ -1171,23 +1159,18 @@
11711159
"fileListEntry": "META-INF/resources/<os>/<arch>/native.files",
11721160
"type": "dir",
11731161
"description": "GraalVM Python platform dependent resources",
1174-
"buildDependencies": [
1175-
"GRAALPYTHON_NATIVE_LIBS",
1176-
"com.oracle.graal.python.cext",
1177-
"com.oracle.graal.python.hpy.llvm"
1178-
],
11791162
"os_arch": {
11801163
"windows": {
11811164
"<others>": {
11821165
"layout": {
11831166
"./META-INF/resources/<os>/<arch>/libs/": [
1184-
"dependency:GRAALPYTHON_NATIVE_LIBS/python-native.lib",
1167+
"dependency:GRAALPYTHON_NATIVE_LIBS/<os>/<arch>/python-native.lib",
11851168
],
11861169
"./META-INF/resources/<os>/<arch>/lib-graalpython/": [
11871170
{
11881171
"source_type": "dependency",
11891172
"dependency": "GRAALPYTHON_NATIVE_LIBS",
1190-
"path": "*",
1173+
"path": "<os>/<arch>/*",
11911174
"exclude": ["python-native.lib"],
11921175
},
11931176
],
@@ -1198,12 +1181,19 @@
11981181
"<others>": {
11991182
"layout": {
12001183
"./META-INF/resources/<os>/<arch>/lib/graalpy<graal_ver:major_minor>/": [
1201-
"dependency:GRAALPYTHON_NATIVE_LIBS/*",
1184+
"dependency:GRAALPYTHON_NATIVE_LIBS/<os>/<arch>/*",
12021185
],
12031186
},
12041187
},
12051188
},
12061189
},
1190+
"platforms": [
1191+
"linux-amd64",
1192+
"linux-aarch64",
1193+
"darwin-amd64",
1194+
"darwin-aarch64",
1195+
"windows-amd64",
1196+
],
12071197
"maven": False,
12081198
},
12091199

@@ -1223,13 +1213,6 @@
12231213
"darwin-aarch64",
12241214
"windows-amd64",
12251215
],
1226-
"buildDependencies": [
1227-
"GRAALPYTHON_LIBPYTHON_RESOURCES",
1228-
"GRAALPYTHON_LIBGRAALPY_RESOURCES",
1229-
"GRAALPYTHON_NI_RESOURCES",
1230-
"GRAALPYTHON_INCLUDE_RESOURCES",
1231-
"GRAALPYTHON_NATIVE_RESOURCES",
1232-
],
12331216
"os_arch": {
12341217
"windows": {
12351218
"<others>": {

0 commit comments

Comments
 (0)