Class UvExecutor

java.lang.Object
org.openrewrite.python.internal.UvExecutor

public class UvExecutor extends Object
Shared utility for finding and executing the uv Python package manager.
  • Constructor Details

    • UvExecutor

      public UvExecutor()
  • Method Details

    • run

      public static UvExecutor.RunResult run(Path workDir, String uvPath, String... args) throws IOException, InterruptedException
      Run a uv command in the given directory.
      Parameters:
      workDir - the working directory
      uvPath - the path to the uv executable
      args - the arguments to pass to uv
      Returns:
      the run result
      Throws:
      IOException
      InterruptedException
    • findUvExecutable

      public static @Nullable String findUvExecutable()
      Find the uv executable on the system.
      Returns:
      the absolute path to uv, or null if not found