Replies: 2 comments 1 reply
-
From looking at the documentation you have linked, it should be straight forward to translate the given sbt example to Mill.
We declare a dependency on scalapy-core. override def ivyDeps = Agg(
ivy"me.shadaj::scalapy-core:0.5.0"
)
This is the default for
This is more or less identical (but I prefer to use def pythonLibsDir: T[String] = T{
val pythonLdFlags = {
val withoutEmbed = os.proc("python3-config", "--ldflags").call(cwd = T.dest).trim()
if (withoutEmbed.contains("-lpython")) {
withoutEmbed.split(' ').map(_.trim).filter(_.nonEmpty).toSeq
} else {
val withEmbed = os.proc("python3-config", "--ldflags", "--embed").call(cwd = T.dest).trim()
withEmbed.split(' ').map(_.trim).filter(_.nonEmpty).toSeq
}
}
val pythonLibsDir = {
pythonLdFlags.find(_.startsWith("-L")).get.drop("-L".length)
}
pythonLibsDir
}
Then we override override def forkArgs = Seq(s"-Djna.library.path=${pythonLibsDir()}")
override def forkEnv = Map("SCALAPY_PYTHON_LIBRARY" -> "python3.8")
$ mill <yourmodule>.run |
Beta Was this translation helpful? Give feedback.
-
The code of lefou has some little compilation error. Here a other solution base on
|
Beta Was this translation helpful? Give feedback.
-
Does anyone have an example setup for using scalapy with mill? https://scalapy.dev/docs/
Beta Was this translation helpful? Give feedback.
All reactions