MCPcopy Index your code
hub / github.com/python/cpython / make_mpdec

Function make_mpdec

Platforms/emscripten/__main__.py:385–424  ·  view source on GitHub ↗
(context, working_dir)

Source from the content-addressed store, hash-verified

383
384@subdir("host_build_dir", clean_ok=True)
385def make_mpdec(context, working_dir):
386 validate_emsdk_version(context.emsdk_cache)
387 prefix = context.build_paths["prefix_dir"]
388 mpdec_config = load_config_toml()["dependencies"]["mpdec"]
389 if not should_build_library(prefix, "mpdec", mpdec_config, context.quiet):
390 return
391
392 if context.check_up_to_date:
393 print("libmpdec out of date, expected to be up to date", file=sys.stderr)
394 sys.exit(1)
395
396 url = mpdec_config["url"]
397 version = mpdec_config["version"]
398 shasum = mpdec_config["shasum"]
399 mpdec_dir = working_dir / f"mpdecimal-{version}"
400 shutil.rmtree(mpdec_dir, ignore_errors=True)
401 download_and_unpack(
402 working_dir,
403 url.format(version=version),
404 shasum,
405 )
406 call(
407 [
408 "emconfigure",
409 mpdec_dir / "configure",
410 "CFLAGS=-fPIC",
411 "--prefix",
412 prefix,
413 "--disable-shared",
414 ],
415 cwd=mpdec_dir,
416 quiet=context.quiet,
417 env=updated_env({}, context.emsdk_cache),
418 )
419 call(
420 ["make", "install"],
421 cwd=mpdec_dir,
422 quiet=context.quiet,
423 )
424 write_library_config(prefix, "mpdec", mpdec_config, context.quiet)
425
426
427def make_dependencies(context):

Callers 1

make_dependenciesFunction · 0.85

Calls 9

validate_emsdk_versionFunction · 0.85
load_config_tomlFunction · 0.85
should_build_libraryFunction · 0.85
download_and_unpackFunction · 0.85
write_library_configFunction · 0.85
callFunction · 0.70
updated_envFunction · 0.70
exitMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…