File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1273,6 +1273,27 @@ def decompress_dependencies(session):
1273
1273
1274
1274
session .log ("Finding broken 'python' symlinks under '.nox/' ..." )
1275
1275
for dirname in os .scandir (REPO_ROOT / ".nox" ):
1276
+ pyenv = REPO_ROOT .joinpath (".nox" , dirname , "pyvenv.cfg" )
1277
+ pyenv_vars = []
1278
+ if os .path .exists (pyenv ):
1279
+ # Update pyvenv.cnf configuration in case the location of
1280
+ # everything changed.
1281
+ with open (pyenv , encoding = "utf-8" ) as fp :
1282
+ for line in fp .readlines ():
1283
+ k , v = (_ .strip () for _ in line .split ("=" , 1 ))
1284
+ if k in [
1285
+ "home" ,
1286
+ "base-prefix" ,
1287
+ "base-exec-prefix" ,
1288
+ "base-executable" ,
1289
+ ]:
1290
+ root , _path = v .split ("artifacts/" , 1 )
1291
+ v = str (REPO_ROOT / "artifacts" / _path )
1292
+ pyenv_vars .append ((k , v ))
1293
+ with open (pyenv , "w" , encoding = "utf-8" ) as fp :
1294
+ for k , v in pyenv_vars :
1295
+ fp .write (f"{ k } = { v } \n " )
1296
+
1276
1297
scan_path = REPO_ROOT .joinpath (".nox" , dirname , scripts_dir_name )
1277
1298
script_paths = {str (p ): p for p in os .scandir (scan_path )}
1278
1299
fixed_shebang = f"#!{ scan_path / 'python' } "
You can’t perform that action at this time.
0 commit comments