@@ -502,13 +502,19 @@ def activate(
502
502
print (f"source { self .runtime_dir / 'activate_all.sh' } " )
503
503
print (f"source { self .runtime_dir / 'prompt.sh' } " )
504
504
505
- def prepare (self , build_policy : str = "outdated" ) -> None :
505
+ def _set_build_policy (self , build_policy : Optional [List [str ]]):
506
+ if build_policy is None :
507
+ build_policy = ["outdated" , "cascade" ]
508
+ for policy in build_policy :
509
+ if policy == "" :
510
+ self .conan_args .append ("--build" )
511
+ else :
512
+ self .conan_args .append (f"--build={ policy } " )
513
+
514
+ def prepare (self , build_policy : Optional [List [str ]] = None ) -> None :
506
515
"""Prepare (by downloading or building) dependencies for the profile."""
507
516
self .capture_output = False
508
- if build_policy == "" :
509
- self .conan_args .append ("--build" )
510
- else :
511
- self .conan_args .append (f"--build={ build_policy } " )
517
+ self ._set_build_policy (build_policy )
512
518
self ._prepare_runtime_env (use_cache = False )
513
519
514
520
def deploy (
@@ -517,14 +523,11 @@ def deploy(
517
523
wrapper : Optional [Path ] = None ,
518
524
wrapper_target : Optional [Path ] = None ,
519
525
patch_rpath : bool = True ,
520
- build_policy : str = "outdated" ,
526
+ build_policy : Optional [ List [ str ]] = None ,
521
527
) -> None :
522
528
"""Deploy dependencies for the profile."""
523
529
self .capture_output = False
524
- if build_policy == "" :
525
- self .conan_args .append ("--build" )
526
- else :
527
- self .conan_args .append (f"--build={ build_policy } " )
530
+ self ._set_build_policy (build_policy )
528
531
self ._prepare_runtime_env (use_cache = False , with_json = True )
529
532
530
533
# Ensure destination exists:
@@ -561,9 +564,9 @@ def copy_tree(src, dest, ignore):
561
564
562
565
for dep in build_data ["dependencies" ]:
563
566
for src in dep ["bin_paths" ]:
564
- copy_tree (src , dest / "bin" , ignore = ["bzip2" ])
567
+ copy_tree (src , dest / "bin" , ignore = ["bzip2" ])
565
568
for src in dep ["lib_paths" ]:
566
- copy_tree (src , dest / "lib" , ignore = ["cmake" , "*.a" ])
569
+ copy_tree (src , dest / "lib" , ignore = ["cmake" , "*.a" ])
567
570
568
571
# Patching RPATH of all the binaries lets everything run
569
572
# fine without any extra steps, like setting LD_LIBRARY_PATH.
0 commit comments