@@ -29,14 +29,14 @@ def prepare_env(p: Plugin, directory: Path, env: dict, workflow: str) -> bool:
29
29
if p .framework == "pip" :
30
30
return prepare_env_pip (p , directory , workflow )
31
31
elif p .framework == "poetry" :
32
- return prepare_env_poetry (p , directory )
32
+ return prepare_env_poetry (p , directory , workflow )
33
33
elif p .framework == "generic" :
34
34
return prepare_generic (p , directory , env , workflow )
35
35
else :
36
36
raise ValueError (f"Unknown framework { p .framework } " )
37
37
38
38
39
- def prepare_env_poetry (p : Plugin , directory : Path ) -> bool :
39
+ def prepare_env_poetry (p : Plugin , directory : Path , workflow : str ) -> bool :
40
40
logging .info ("Installing a new poetry virtualenv" )
41
41
42
42
pip3 = directory / "bin" / "pip3"
@@ -91,6 +91,11 @@ def prepare_env_poetry(p: Plugin, directory: Path) -> bool:
91
91
stderr = subprocess .STDOUT ,
92
92
)
93
93
94
+ if workflow == "nightly" :
95
+ install_dev_pyln_testing (pip3 )
96
+ else :
97
+ install_pyln_testing (pip3 )
98
+
94
99
subprocess .check_call ([pip3 , "freeze" ])
95
100
return True
96
101
@@ -99,11 +104,6 @@ def prepare_env_pip(p: Plugin, directory: Path, workflow: str) -> bool:
99
104
print ("Installing a new pip virtualenv" )
100
105
pip_path = directory / "bin" / "pip3"
101
106
102
- if workflow == "nightly" :
103
- install_dev_pyln_testing (pip_path )
104
- else :
105
- install_pyln_testing (pip_path )
106
-
107
107
# Now install all the requirements
108
108
print (f"Installing requirements from { p .details ['requirements' ]} " )
109
109
subprocess .check_call (
@@ -118,6 +118,11 @@ def prepare_env_pip(p: Plugin, directory: Path, workflow: str) -> bool:
118
118
stderr = subprocess .STDOUT ,
119
119
)
120
120
121
+ if workflow == "nightly" :
122
+ install_dev_pyln_testing (pip_path )
123
+ else :
124
+ install_pyln_testing (pip_path )
125
+
121
126
subprocess .check_call ([pip_path , "freeze" ])
122
127
return True
123
128
@@ -126,11 +131,6 @@ def prepare_generic(p: Plugin, directory: Path, env: dict, workflow: str) -> boo
126
131
print ("Installing a new generic virtualenv" )
127
132
pip_path = directory / "bin" / "pip3"
128
133
129
- if workflow == "nightly" :
130
- install_dev_pyln_testing (pip_path )
131
- else :
132
- install_pyln_testing (pip_path )
133
-
134
134
# Now install all the requirements
135
135
if p .details ["requirements" ].exists ():
136
136
print (f"Installing requirements from { p .details ['requirements' ]} " )
@@ -147,6 +147,11 @@ def prepare_generic(p: Plugin, directory: Path, env: dict, workflow: str) -> boo
147
147
stderr = subprocess .STDOUT ,
148
148
)
149
149
150
+ if workflow == "nightly" :
151
+ install_dev_pyln_testing (pip_path )
152
+ else :
153
+ install_pyln_testing (pip_path )
154
+
150
155
subprocess .check_call ([pip_path , "freeze" ])
151
156
return True
152
157
0 commit comments