Skip to content

Commit 1e26a7c

Browse files
committed
Fix CI: migrate BuildDetailsLibpythonTests to sysconfig._build_details API (gh-107956)
Drop the deleted Tools/build/generate-build-details.py from Tools/build/mypy.ini and finish the test migration to the new BuildDetails API. Co-authored-by: Muse Code (Meta Muse Spark)
1 parent 25ddb4e commit 1e26a7c

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

‎Lib/test/test_build_details.py‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,6 @@ def test_round_trip(self):
227227
self.assertEqual(data_abs_path[part][key], abs_rel_path)
228228

229229

230-
@unittest.skipIf(
231-
generate_build_details is None,
232-
"Failed to import generate-build-details"
233-
)
234230
@unittest.skipIf(os.name != 'posix', 'Feature only implemented on POSIX')
235231
@unittest.skipIf(is_wasm32, 'Feature not available on WebAssembly builds')
236232
class BuildDetailsLibpythonTests(unittest.TestCase):
@@ -247,8 +243,8 @@ def patched_get_config_var(name):
247243
return config_vars[name]
248244
return get_config_var(name)
249245
with mock.patch('sysconfig.get_config_var', patched_get_config_var):
250-
data = generate_build_details.generate_data(schema_version='1.0')
251-
return json.loads(json.dumps(data)).get('libpython', {})
246+
json_data = build_details.BuildDetails.from_interpreter().as_json()
247+
return json.loads(json_data).get('libpython', {})
252248

253249
def test_static_only(self):
254250
libpython = self.generate_libpython(

‎Tools/build/mypy.ini‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ files =
88
Tools/build/compute-changes.py,
99
Tools/build/consts_getter.py,
1010
Tools/build/deepfreeze.py,
11-
Tools/build/generate-build-details.py,
1211
Tools/build/generate_levenshtein_examples.py,
1312
Tools/build/generate_sbom.py,
1413
Tools/build/generate_stdlib_module_names.py,

0 commit comments

Comments
 (0)