@@ -33,7 +33,7 @@ enum Commands {
3333 list : bool ,
3434
3535 /// Directory to cache the environment information after spawning Python.
36- #[ arg( short, long) ]
36+ #[ arg( short, long, env = "PET_CACHE_DIRECTORY" ) ]
3737 cache_directory : Option < PathBuf > ,
3838
3939 /// Display verbose output (defaults to warnings).
@@ -57,6 +57,23 @@ enum Commands {
5757 /// Output results as JSON.
5858 #[ arg( short, long) ]
5959 json : bool ,
60+
61+ /// Path to the conda or mamba executable.
62+ #[ arg( long, env = "PET_CONDA_EXECUTABLE" ) ]
63+ conda_executable : Option < PathBuf > ,
64+
65+ /// Path to the pipenv executable.
66+ #[ arg( long, env = "PET_PIPENV_EXECUTABLE" ) ]
67+ pipenv_executable : Option < PathBuf > ,
68+
69+ /// Path to the poetry executable.
70+ #[ arg( long, env = "PET_POETRY_EXECUTABLE" ) ]
71+ poetry_executable : Option < PathBuf > ,
72+
73+ /// Additional directories where virtual environments can be found.
74+ /// Use comma-separated values when setting via the environment variable.
75+ #[ arg( long, env = "PET_ENVIRONMENT_DIRECTORIES" , value_delimiter = ',' ) ]
76+ environment_directories : Option < Vec < PathBuf > > ,
6077 } ,
6178 /// Resolves & reports the details of the the environment to the standard output.
6279 Resolve {
@@ -65,7 +82,7 @@ enum Commands {
6582 executable : PathBuf ,
6683
6784 /// Directory to cache the environment information after spawning Python.
68- #[ arg( short, long) ]
85+ #[ arg( short, long, env = "PET_CACHE_DIRECTORY" ) ]
6986 cache_directory : Option < PathBuf > ,
7087
7188 /// Whether to display verbose output (defaults to warnings).
@@ -92,6 +109,10 @@ fn main() {
92109 cache_directory : None ,
93110 kind : None ,
94111 json : false ,
112+ conda_executable : None ,
113+ pipenv_executable : None ,
114+ poetry_executable : None ,
115+ environment_directories : None ,
95116 } ) {
96117 Commands :: Find {
97118 list,
@@ -102,6 +123,10 @@ fn main() {
102123 cache_directory,
103124 kind,
104125 json,
126+ conda_executable,
127+ pipenv_executable,
128+ poetry_executable,
129+ environment_directories,
105130 } => {
106131 let mut workspace_only = workspace;
107132 if search_paths. clone ( ) . is_some ( )
@@ -124,6 +149,10 @@ fn main() {
124149 cache_directory,
125150 kind,
126151 json,
152+ conda_executable,
153+ pipenv_executable,
154+ poetry_executable,
155+ environment_directories,
127156 } ) ;
128157 }
129158 Commands :: Resolve {
0 commit comments