Skip to content

Commit

Permalink
chore(bindings/java): improve build.py script (#3529)
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Nov 8, 2023
1 parent 9546db7 commit 08d7e41
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions bindings/java/tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,22 @@ def classifier_to_target(classifier: str) -> str:
return 'aarch64-apple-darwin'
if classifier == 'osx-x86_64':
return 'x86_64-apple-darwin'
if classifier == 'linux-aarch_64':
return 'aarch64-unknown-linux-gnu'
if classifier == 'linux-x86_64':
return 'x86_64-unknown-linux-gnu'
if classifier == 'windows-x86_64':
return 'x86_64-pc-windows-msvc'
if classifier == 'linux-aarch_64':
return 'aarch64-unknown-linux-gnu'
raise Exception(f'Unsupported classifier: {classifier}')


def get_cargo_artifact_name(classifier: str) -> str:
if classifier == 'osx-aarch_64':
if classifier.startswith('osx'):
return 'libopendal_java.dylib'
if classifier == 'osx-x86_64':
return 'libopendal_java.dylib'
if classifier == 'linux-x86_64':
if classifier.startswith('linux'):
return 'libopendal_java.so'
if classifier == 'windows-x86_64':
if classifier.startswith('windows'):
return 'opendal_java.dll'
if classifier == 'linux-aarch_64':
return 'libopendal_java.so'
raise Exception(f'Unsupported classifier: {classifier}')


Expand Down

0 comments on commit 08d7e41

Please sign in to comment.