(prefix_p: Prefix, pub_cache: str)
| 46 | bin_dir = os.path.join(envdir, 'bin') |
| 47 | |
| 48 | def _install_dir(prefix_p: Prefix, pub_cache: str) -> None: |
| 49 | dart_env = {**os.environ, 'PUB_CACHE': pub_cache} |
| 50 | |
| 51 | with open(prefix_p.path('pubspec.yaml')) as f: |
| 52 | pubspec_contents = yaml_load(f) |
| 53 | |
| 54 | lang_base.setup_cmd(prefix_p, ('dart', 'pub', 'get'), env=dart_env) |
| 55 | |
| 56 | for executable in pubspec_contents['executables']: |
| 57 | lang_base.setup_cmd( |
| 58 | prefix_p, |
| 59 | ( |
| 60 | 'dart', 'compile', 'exe', |
| 61 | '--output', os.path.join(bin_dir, win_exe(executable)), |
| 62 | prefix_p.path('bin', f'{executable}.dart'), |
| 63 | ), |
| 64 | env=dart_env, |
| 65 | ) |
| 66 | |
| 67 | os.makedirs(bin_dir) |
| 68 |
no test coverage detected