-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No example #1
Comments
What do you mean when you say it's not working? Are there compilation errors, runtime errors, or something else? |
For now I got error from setup.py:
I will add PR for how-to when it will work) |
After build or run setup.py there is no "generated" folder build.gradle.ktsimport com.martmists.kpy.plugin.PythonVersion
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import java.util.*
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kpy)
}
val targetName = "native"
kotlin {
jvm()
val hostOs = System.getProperty("os.name")
val isMingwX64 = hostOs.startsWith("Windows")
val isArm64 = System.getProperty("os.arch") == "aarch64"
val nativeTarget = when {
hostOs == "Mac OS X" && !isArm64 -> macosX64(targetName)
hostOs == "Linux" && !isArm64 -> linuxX64(targetName)
hostOs == "Mac OS X" && isArm64 -> macosArm64(targetName)
hostOs == "Linux" && isArm64 -> linuxArm64(targetName)
isMingwX64 -> mingwX64(targetName)
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
}
sourceSets {
val commonMain by getting {
dependencies {
}
}
val commonTest by getting {
dependencies {
}
}
}
nativeTarget.apply {
val main by compilations.getting {
}
binaries {
staticLib {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
optIn = listOf(
"kotlinx.cinterop.ExperimentalForeignApi",
)
}
}
}
}
}
kpy {
target = targetName
generateStubs = true
pyVersion = PythonVersion.Py310
moduleName = rootProject.name
version = rootProject.version
} |
Are you installing it with |
When I run Error{'packages': [], 'package_dir': {'': 'D:\\WorkSL\x07ngrydata\\library\x08uild/generated/ksp/native/nativeMain/resources'}}
running bdist_wheel
error: error in 'egg_base' option: 'D:\WorkSLngrydata\libraryuild/generated/ksp/native/nativeMain/resources' does not exist or is not a directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel And there no |
run |
Same error. There no |
There is no example how to use this library by importing plugin.
Example from main readme and from kpy-sample (which uses local library) not working
The text was updated successfully, but these errors were encountered: