Fill the required build options through custom variable 'numpy_build_options' and return the generated config path.
(bench_path, args, h_commits)
| 558 | return site_dir, site_dir_noarch |
| 559 | |
| 560 | def asv_compare_config(bench_path, args, h_commits): |
| 561 | """ |
| 562 | Fill the required build options through custom variable |
| 563 | 'numpy_build_options' and return the generated config path. |
| 564 | """ |
| 565 | conf_path = os.path.join(bench_path, "asv_compare.conf.json.tpl") |
| 566 | nconf_path = os.path.join(bench_path, "_asv_compare.conf.json") |
| 567 | |
| 568 | # add custom build |
| 569 | build = [] |
| 570 | if args.parallel > 1: |
| 571 | build += ["-j", str(args.parallel)] |
| 572 | if args.cpu_baseline: |
| 573 | build += ["--cpu-baseline", args.cpu_baseline] |
| 574 | if args.cpu_dispatch: |
| 575 | build += ["--cpu-dispatch", args.cpu_dispatch] |
| 576 | if args.disable_optimization: |
| 577 | build += ["--disable-optimization"] |
| 578 | |
| 579 | is_cached = asv_substitute_config(conf_path, nconf_path, |
| 580 | numpy_build_options = ' '.join([f'\\"{v}\\"' for v in build]), |
| 581 | numpy_global_options= ' '.join([f'--global-option=\\"{v}\\"' for v in ["build"] + build]) |
| 582 | ) |
| 583 | if not is_cached: |
| 584 | asv_clear_cache(bench_path, h_commits) |
| 585 | return nconf_path |
| 586 | |
| 587 | def asv_clear_cache(bench_path, h_commits, env_dir="env"): |
| 588 | """ |
no test coverage detected