Package org.openrewrite.python.internal
Class PackageManagerExecutor
java.lang.Object
org.openrewrite.python.internal.PackageManagerExecutor
Locates and runs a Python package manager CLI. Pre-configured instances are
provided for
uv (UV) and pipenv (PIPENV);
each caches the resolved executable path on first find().
Callers that just need the executable path can call find() and skip
lock regeneration when it returns null. Callers that already have the
path can run subcommands via run(Path, String, Map, String...).
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PackageManagerExecutorstatic final PackageManagerExecutor -
Method Summary
-
Field Details
-
UV
-
PIPENV
-
-
Method Details
-
run
public PackageManagerExecutor.RunResult run(Path workDir, String executablePath, Map<String, String> environment, String... args) throws IOException, InterruptedExceptionRun the package manager in the given directory with additional environment variables.- Throws:
IOExceptionInterruptedException
-
find
Find the executable on the system. Returnsnullwhen the tool is not installed or not onPATH— callers should warn-and-skip in that case.
-