File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 23
23
def get_anaconda_output_for_package (pkg_name_str ):
24
24
import subprocess as sp
25
25
26
- cmd = "conda list --explicit"
27
- output = sp .getoutput (cmd )
28
- for item in output .split ("\n " ):
29
- if pkg_name_str in item :
30
- return item
31
-
32
- # Get the last line only
33
- return f"{ pkg_name_str } can't be found"
26
+ # If we are installing using conda just list package name
27
+ if installation_str .find ("conda install" ) != - 1 :
28
+ cmd = "conda list --explicit"
29
+ output = sp .getoutput (cmd )
30
+ for item in output .split ("\n " ):
31
+ if pkg_name_str in item :
32
+ return item
33
+ return f"{ pkg_name_str } can't be found"
34
+ else :
35
+ cmd = "conda list -f " + pkg_name_str
36
+ output = sp .getoutput (cmd )
37
+ # Get the last line only
38
+ return output .strip ().split ('\n ' )[- 1 ]
34
39
35
40
36
41
def check_nightly_binaries_date () -> None :
You can’t perform that action at this time.
0 commit comments