|
24 | 24 | meets_python_maximum_version, |
25 | 25 | meets_python_minimum_version, |
26 | 26 | parse_setup_line, |
| 27 | + stdlib_test_annotations, |
27 | 28 | ) |
28 | 29 | from pythonbuild.docker import build_docker_image, get_image, write_dockerfiles |
29 | 30 | from pythonbuild.downloads import DOWNLOADS |
|
50 | 51 | SUPPORT = ROOT / "cpython-unix" |
51 | 52 | EXTENSION_MODULES = SUPPORT / "extension-modules.yml" |
52 | 53 | TARGETS_CONFIG = SUPPORT / "targets.yml" |
| 54 | +STDLIB_TEST_ANNOTATIONS = ROOT / "stdlib-test-annotations.yml" |
53 | 55 |
|
54 | 56 | LINUX_ALLOW_SYSTEM_LIBRARIES = { |
55 | 57 | "c", |
@@ -732,6 +734,13 @@ def build_cpython( |
732 | 734 | setuptools_archive = download_entry("setuptools", DOWNLOADS_PATH) |
733 | 735 | pip_archive = download_entry("pip", DOWNLOADS_PATH) |
734 | 736 |
|
| 737 | + test_annotations = stdlib_test_annotations( |
| 738 | + STDLIB_TEST_ANNOTATIONS, |
| 739 | + python_version, |
| 740 | + target_triple, |
| 741 | + parsed_build_options, |
| 742 | + ) |
| 743 | + |
735 | 744 | ems = extension_modules_config(EXTENSION_MODULES) |
736 | 745 |
|
737 | 746 | setup = derive_setup_local( |
@@ -804,6 +813,14 @@ def build_cpython( |
804 | 813 |
|
805 | 814 | build_env.copy_file(fh.name, dest_name="Makefile.extra") |
806 | 815 |
|
| 816 | + # Install the derived test annotations. |
| 817 | + with tempfile.NamedTemporaryFile("w", encoding="utf-8") as fh: |
| 818 | + os.chmod(fh.name, 0o644) |
| 819 | + test_annotations.json_dump(fh) |
| 820 | + fh.flush() |
| 821 | + |
| 822 | + build_env.copy_file(fh.name, dest_name="stdlib-test-annotations.json") |
| 823 | + |
807 | 824 | env = { |
808 | 825 | "PIP_VERSION": DOWNLOADS["pip"]["version"], |
809 | 826 | "PYTHON_VERSION": python_version, |
@@ -1070,7 +1087,7 @@ def main(): |
1070 | 1087 | write_dockerfiles(SUPPORT, BUILD) |
1071 | 1088 | elif action == "makefiles": |
1072 | 1089 | targets = get_targets(TARGETS_CONFIG) |
1073 | | - write_triples_makefiles(targets, BUILD, SUPPORT) |
| 1090 | + write_triples_makefiles(targets, ROOT, BUILD, SUPPORT) |
1074 | 1091 | write_target_settings(targets, BUILD / "targets") |
1075 | 1092 | write_package_versions(BUILD / "versions") |
1076 | 1093 |
|
|
0 commit comments