Skip to content

Commit

Permalink
Allow setting CWD of Python subprocess (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
ducky64 authored Aug 8, 2024
1 parent f80beeb commit 94b7031
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/src/main/scala/edg/compiler/PythonInterface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ trait ProtobufInterface {

class ProtobufStdioSubprocess(
interpreter: String = "python",
cwd: Option[File] = None,
pythonPaths: Seq[String] = Seq()
) extends ProtobufInterface {
private val submoduleSearchPaths = if (pythonPaths.nonEmpty) pythonPaths else Seq(".")
Expand All @@ -83,6 +84,7 @@ class ProtobufStdioSubprocess(
case Some(envPythonPath) => env.put("PYTHONPATH", envPythonPath + ";" + pythonPathString)
}
}
cwd.foreach(cwd => processBuilder.directory(cwd))
processBuilder.start()
}

Expand Down
Binary file modified edg/core/resources/edg-compiler-precompiled.jar
Binary file not shown.

0 comments on commit 94b7031

Please sign in to comment.