Skip to content

Commit

Permalink
add macos support
Browse files Browse the repository at this point in the history
Signed-off-by: Martmists <[email protected]>
  • Loading branch information
Martmists-GH committed Jun 1, 2024
1 parent 3387437 commit 8d812a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/DownloadPythonTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ abstract class DownloadPythonTask : DefaultTask() {
enum class Platform {
Windows,
Linux,
MacOS,
}

@get:Input
Expand All @@ -56,6 +57,7 @@ abstract class DownloadPythonTask : DefaultTask() {
val hostOs = when (platform) {
Platform.Windows -> "pc-windows-msvc"
Platform.Linux -> "unknown-linux-gnu"
Platform.MacOS -> "apple-darwin"
else -> throw IllegalArgumentException("Unsupported platform: $platform")
}
val tmpFile by tarFile
Expand Down
1 change: 1 addition & 0 deletions kpy-library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ kotlin {
platform = when (konanTarget) {
KonanTarget.MINGW_X64 -> DownloadPythonTask.Platform.Windows
KonanTarget.LINUX_X64 -> DownloadPythonTask.Platform.Linux
KonanTarget.MACOS_X64 -> DownloadPythonTask.Platform.MacOS
else -> throw IllegalArgumentException("Unsupported target: $targetName")
}
}
Expand Down

0 comments on commit 8d812a0

Please sign in to comment.