File tree Expand file tree Collapse file tree 4 files changed +29
-3
lines changed Expand file tree Collapse file tree 4 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,10 @@ python_stdlib
304
304
Relative path to Python's standard library (where ``.py `` and resource
305
305
files are located).
306
306
307
+ python_stdlib_test_packages
308
+ Array of strings of Python packages that define tests. (Version 4 or above
309
+ only.)
310
+
307
311
link_mode
308
312
How `libpython ` is linked. Values can be one of the following:
309
313
Original file line number Diff line number Diff line change 15
15
import docker
16
16
17
17
from pythonbuild .buildenv import build_environment
18
- from pythonbuild .cpython import derive_setup_local , parse_config_c , parse_setup_line
18
+ from pythonbuild .cpython import (
19
+ derive_setup_local ,
20
+ parse_config_c ,
21
+ parse_setup_line ,
22
+ STDLIB_TEST_PACKAGES ,
23
+ )
19
24
from pythonbuild .docker import build_docker_image , get_image
20
25
from pythonbuild .downloads import DOWNLOADS
21
26
from pythonbuild .logging import log , set_logger
@@ -649,6 +654,7 @@ def build_cpython(
649
654
"python_exe" : "install/bin/%s" % fully_qualified_name ,
650
655
"python_include" : "install/include/%s" % fully_qualified_name ,
651
656
"python_stdlib" : "install/lib/python%s" % entry ["version" ][0 :3 ],
657
+ "python_stdlib_test_packages" : sorted (STDLIB_TEST_PACKAGES ),
652
658
"link_mode" : "static" ,
653
659
"build_info" : python_build_info (
654
660
build_env ,
Original file line number Diff line number Diff line change 7
7
import concurrent .futures
8
8
import datetime
9
9
import json
10
- import multiprocessing
11
10
import os
12
11
import pathlib
13
12
import re
18
17
import zipfile
19
18
20
19
from pythonbuild .downloads import DOWNLOADS
21
- from pythonbuild .cpython import parse_config_c
20
+ from pythonbuild .cpython import parse_config_c , STDLIB_TEST_PACKAGES
22
21
from pythonbuild .utils import (
23
22
create_tar_from_directory ,
24
23
download_entry ,
@@ -1749,6 +1748,7 @@ def build_cpython(arch: str, profile):
1749
1748
"python_exe" : "install/python.exe" ,
1750
1749
"python_include" : "install/include" ,
1751
1750
"python_stdlib" : "install/Lib" ,
1751
+ "python_stdlib_test_packages" : sorted (STDLIB_TEST_PACKAGES ),
1752
1752
"link_mode" : "static" if static else "shared" ,
1753
1753
"build_info" : build_info ,
1754
1754
"licenses" : DOWNLOADS ["cpython-3.7" ]["licenses" ],
Original file line number Diff line number Diff line change 66
66
b"_testcapi"
67
67
}
68
68
69
+ # Packages that define tests.
70
+ STDLIB_TEST_PACKAGES = {
71
+ "bsddb.test" ,
72
+ "ctypes.test" ,
73
+ "distutils.tests" ,
74
+ "email.test" ,
75
+ "idlelib.idle_test" ,
76
+ "json.tests" ,
77
+ "lib-tk.test" ,
78
+ "lib2to3.tests" ,
79
+ "sqlite3.test" ,
80
+ "test" ,
81
+ "tkinter.test" ,
82
+ "unittest.test" ,
83
+ }
84
+
69
85
70
86
def parse_setup_line (line : bytes , variant : str ):
71
87
"""Parse a line in a ``Setup.*`` file."""
You can’t perform that action at this time.
0 commit comments