@@ -422,107 +422,6 @@ def generate_outputs_version(distro, vinca_conf):
422
422
return outputs
423
423
424
424
425
- def generate_fat_output (pkg_shortname , vinca_conf , distro ):
426
- if pkg_shortname not in vinca_conf ["_selected_pkgs" ]:
427
- return [], []
428
- pkg_names = resolve_pkgname (pkg_shortname , vinca_conf , distro )
429
- if not pkg_names :
430
- return [], []
431
- pkg = catkin_pkg .package .parse_package_string (
432
- distro .get_release_package_xml (pkg_shortname )
433
- )
434
- pkg .evaluate_conditions (os .environ )
435
- resolved_python = resolve_pkgname_from_indexes (
436
- "python" , vinca_conf ["_conda_indexes" ]
437
- )
438
- host_requirements = []
439
- run_requirements = []
440
- run_requirements .extend (resolved_python )
441
- host_requirements .extend (resolved_python )
442
- if distro .get_python_version () == 3 :
443
- resolved_setuptools = resolve_pkgname_from_indexes (
444
- "setuptools" , vinca_conf ["_conda_indexes" ]
445
- )
446
- host_requirements .extend (resolved_setuptools )
447
- if not distro .check_ros1 ():
448
- resolved_colcon = resolve_pkgname_from_indexes (
449
- "colcon-common-extensions" , vinca_conf ["_conda_indexes" ]
450
- )
451
- host_requirements .extend (resolved_colcon )
452
-
453
- build_deps = pkg .build_depends
454
- build_deps += pkg .buildtool_depends
455
- build_deps += pkg .build_export_depends
456
- build_deps += pkg .buildtool_export_depends
457
- build_deps += pkg .test_depends
458
- build_deps += pkg .run_depends
459
- build_deps += pkg .exec_depends
460
- build_deps = [d .name for d in build_deps if d .evaluated_condition ]
461
- build_deps = set (build_deps )
462
-
463
- for dep in build_deps :
464
- if dep in vinca_conf ["_selected_pkgs" ]:
465
- # don't repeat the selected pkgs in the reqs.
466
- continue
467
- resolved_dep = resolve_pkgname_from_indexes (dep , vinca_conf ["_conda_indexes" ])
468
- if not resolved_dep :
469
- unsatisfied_deps .add (dep )
470
- continue
471
- host_requirements .extend (resolved_dep )
472
-
473
- run_deps = pkg .run_depends
474
- run_deps += pkg .exec_depends
475
- run_deps += pkg .build_export_depends
476
- run_deps += pkg .buildtool_export_depends
477
- run_deps = [d .name for d in run_deps if d .evaluated_condition ]
478
- run_deps = set (run_deps )
479
-
480
- for dep in run_deps :
481
- if dep in vinca_conf ["_selected_pkgs" ]:
482
- # don't repeat the selected pkgs in the reqs.
483
- continue
484
- resolved_dep = resolve_pkgname_from_indexes (dep , vinca_conf ["_conda_indexes" ])
485
- if not resolved_dep :
486
- unsatisfied_deps .add (dep )
487
- continue
488
- run_requirements .extend (resolved_dep )
489
-
490
- return host_requirements , run_requirements
491
-
492
-
493
- def generate_fat_outputs (distro , vinca_conf ):
494
- outputs = []
495
- output = {
496
- "name" : vinca_conf ["name" ],
497
- "requirements" : {
498
- "build" : ["{{ compiler('cxx') }}" , "{{ compiler('c') }}" , "ninja" , "cmake" ],
499
- "host" : [],
500
- "run" : [],
501
- },
502
- }
503
-
504
- # use catkin for ros1
505
- if distro .check_ros1 ():
506
- output ["script" ] = "bld_catkin_merge.bat"
507
- else :
508
- output ["script" ] = "bld_colcon_merge.bat"
509
-
510
- for pkg_shortname in vinca_conf ["_selected_pkgs" ]:
511
- host_requirements , run_requirements = generate_fat_output (
512
- pkg_shortname , vinca_conf , distro
513
- )
514
- output ["requirements" ]["host" ].extend (host_requirements )
515
- output ["requirements" ]["run" ].extend (run_requirements )
516
-
517
- output ["requirements" ]["host" ] = list (set (output ["requirements" ]["host" ]))
518
- output ["requirements" ]["run" ] = list (set (output ["requirements" ]["run" ]))
519
- output ["requirements" ]["host" ] = sorted (output ["requirements" ]["host" ])
520
- output ["requirements" ]["run" ] = sorted (output ["requirements" ]["run" ])
521
- outputs .append (output )
522
-
523
- return outputs
524
-
525
-
526
425
def generate_source (distro , vinca_conf ):
527
426
source = {}
528
427
for pkg_shortname in vinca_conf ["_selected_pkgs" ]:
@@ -970,22 +869,19 @@ def main():
970
869
971
870
vinca_conf ["_selected_pkgs" ] = selected_pkgs
972
871
973
- if "fat_archive" in vinca_conf and vinca_conf [ "fat_archive" ] :
974
- source = generate_fat_source (distro , vinca_conf )
975
- outputs = generate_fat_outputs (distro , vinca_conf )
872
+ if arguments . source :
873
+ source = generate_source_version (distro , vinca_conf )
874
+ outputs = generate_outputs_version (distro , vinca_conf )
976
875
else :
977
- if arguments .source :
978
- source = generate_source_version (distro , vinca_conf )
979
- outputs = generate_outputs_version (distro , vinca_conf )
980
- else :
981
- source = generate_source (distro , vinca_conf )
982
- outputs = generate_outputs (distro , vinca_conf )
876
+ source = generate_source (distro , vinca_conf )
877
+ outputs = generate_outputs (distro , vinca_conf )
983
878
984
879
if arguments .multiple_file :
985
880
write_recipe (source , outputs , vinca_conf .get ("build_number" , 0 ), False )
986
881
else :
987
882
write_recipe (source , outputs , vinca_conf .get ("build_number" , 0 ))
988
883
989
- print (unsatisfied_deps )
884
+ if unsatisfied_deps :
885
+ print ('Unsatisfied dependencies:' , unsatisfied_deps )
990
886
991
887
print ("build scripts are created successfully." )
0 commit comments