Skip to content

Commit 1520ee8

Browse files
committed
Move mpdec and libffi into a dependencies subtable
1 parent 830188c commit 1520ee8

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/workflows/reusable-emscripten.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ jobs:
2727
2828
config = tomllib.loads(Path("Platforms/emscripten/config.toml").read_text())
2929
h = hashlib.sha256()
30-
h.update(json.dumps(config["libffi"], sort_keys=True).encode())
31-
h.update(json.dumps(config["mpdec"], sort_keys=True).encode())
30+
h.update(json.dumps(config["dependencies"], sort_keys=True).encode())
3231
h.update(Path("Platforms/emscripten/make_libffi.sh").read_bytes())
3332
emsdk_cache = Path(os.environ["RUNNER_TEMP"]) / "emsdk-cache"
3433
with open(os.environ["GITHUB_OUTPUT"], "a") as f:

Platforms/emscripten/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def write_library_config(prefix, name, config, quiet):
350350
def make_emscripten_libffi(context, working_dir):
351351
validate_emsdk_version(context.emsdk_cache)
352352
prefix = context.build_paths["prefix_dir"]
353-
libffi_config = load_config_toml()["libffi"]
353+
libffi_config = load_config_toml()["dependencies"]["libffi"]
354354
if not should_build_library(
355355
prefix, "libffi", libffi_config, context.quiet
356356
):
@@ -378,7 +378,7 @@ def make_emscripten_libffi(context, working_dir):
378378
def make_mpdec(context, working_dir):
379379
validate_emsdk_version(context.emsdk_cache)
380380
prefix = context.build_paths["prefix_dir"]
381-
mpdec_config = load_config_toml()["mpdec"]
381+
mpdec_config = load_config_toml()["dependencies"]["mpdec"]
382382
if not should_build_library(prefix, "mpdec", mpdec_config, context.quiet):
383383
return
384384

@@ -705,15 +705,15 @@ def main():
705705
help=(
706706
"If passed, will add the default test arguments to the beginning of the command. "
707707
"Default arguments loaded from Platforms/emscripten/config.toml"
708-
)
708+
),
709709
)
710710
run.add_argument(
711711
"args",
712712
nargs=argparse.REMAINDER,
713713
help=(
714714
"Arguments to pass to the emscripten Python "
715715
"(use '--' to separate from run options)",
716-
)
716+
),
717717
)
718718
add_cross_build_dir_option(run)
719719

Platforms/emscripten/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ test-args = [
1212
"-W",
1313
]
1414

15-
[libffi]
15+
[dependencies.libffi]
1616
url = "https://github.com/libffi/libffi/releases/download/v{version}/libffi-{version}.tar.gz"
1717
version = "3.4.6"
1818
shasum = "b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e"
1919

20-
[mpdec]
20+
[dependencies.mpdec]
2121
url = "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-{version}.tar.gz"
2222
version = "4.0.1"
2323
shasum = "96d33abb4bb0070c7be0fed4246cd38416188325f820468214471938545b1ac8"

0 commit comments

Comments
 (0)