Skip to content

Commit 392fece

Browse files
committed
fixup! Simplify by removing macos platform
1 parent 6a94b26 commit 392fece

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

tests/pypi/extension/extension_tests.bzl

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -421,25 +421,19 @@ def _test_simple_multiple_platforms_with_extras(env):
421421
requirements_by_platform = {
422422
"requirements.linux_arm64.txt": "linux_aarch64",
423423
"requirements.linux_x86_64.txt": "linux_x86_64",
424-
"requirements.macos_arm64.txt": "osx_aarch64",
425424
},
426425
experimental_index_url = "pypi.org",
427426
),
428427
],
429428
),
430429
read = lambda x: {
431430
"requirements.linux_arm64.txt": """\
432-
jax==0.7.0 \
431+
package==0.7.0 \
433432
--hash=sha256:4dd8924f171ed73a4f1a6191e2f800ae1745069989b69fabc45593d6b6504003 \
434433
--hash=sha256:62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76
435434
""",
436435
"requirements.linux_x86_64.txt": """\
437-
jax[cuda12]==0.7.0 \
438-
--hash=sha256:62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76
439-
""",
440-
"requirements.macos_arm64.txt": """\
441-
jax==0.7.0 \
442-
--hash=sha256:4dd8924f171ed73a4f1a6191e2f800ae1745069989b69fabc45593d6b6504003 \
436+
package[extra]==0.7.0 \
443437
--hash=sha256:62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76
444438
""",
445439
}[x],
@@ -449,44 +443,44 @@ jax==0.7.0 \
449443
},
450444
minor_mapping = {"3.12": "3.12.11"},
451445
simpleapi_download = lambda *_, **__: {
452-
"jax": parse_simpleapi_html(
453-
url = "https://example.com/jax",
446+
"package": parse_simpleapi_html(
447+
url = "https://example.com/package",
454448
content = """
455-
<a href="jax-0.7.0.tar.gz#sha256=4dd8924f171ed73a4f1a6191e2f800ae1745069989b69fabc45593d6b6504003" data-requires-python="&gt;=3.11">jax-0.7.0.tar.gz</a>
456-
<a href="jax-0.7.0-py3-none-any.whl#sha256=62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76" data-requires-python="&gt;=3.11" data-dist-info-metadata="sha256=99d99c9ac3b0b8273e2c248da18a3b73dce72cc178336881324e9ecf8da36d0a" data-core-metadata="sha256=99d99c9ac3b0b8273e2c248da18a3b73dce72cc178336881324e9ecf8da36d0a">jax-0.7.0-py3-none-any.whl</a>
449+
<a href="package-0.7.0.tar.gz#sha256=4dd8924f171ed73a4f1a6191e2f800ae1745069989b69fabc45593d6b6504003">package-0.7.0.tar.gz</a>
450+
<a href="package-0.7.0-py3-none-any.whl#sha256=62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76">package-0.7.0-py3-none-any.whl</a>
457451
""",
458452
),
459453
},
460454
)
461455

462-
pypi.exposed_packages().contains_exactly({"pypi": ["jax"]})
456+
pypi.exposed_packages().contains_exactly({"pypi": ["package"]})
463457
# TODO(hartikainen): Check these expectations.
464458
pypi.hub_whl_map().contains_exactly({"pypi": {
465-
"jax": {
466-
"pypi_312_jax_py3_none_any_62833036": [
459+
"package": {
460+
"pypi_312_package_py3_none_any_62833036": [
467461
whl_config_setting(
468462
# TODO(hartikainen): I think all these platforms use the same `.whl`
469463
# and thus all three platforms should be included in the same
470464
# `target_platforms` here?
471-
target_platforms = ["cp312_linux_arm64", "cp312_linux_x86_64", "cp312_osx_aarch64"],
465+
target_platforms = ["cp312_linux_arm64", "cp312_linux_x86_64"],
472466
version = "3.12",
473467
),
474468
],
475469
},
476470
}})
477471
pypi.whl_libraries().contains_exactly({
478-
"pypi_312_jax_py3_none_any_62833036": {
472+
"pypi_312_package_py3_none_any_62833036": {
479473
"dep_template": "@pypi//{name}:{target}",
480474
"download_only": True,
481-
"experimental_target_platforms": ["linux_arm64", "linux_x86_64", "osx_aarch64"],
482-
"filename": "jax-0.7.0-py3-none-any.whl",
475+
"experimental_target_platforms": ["linux_arm64", "linux_x86_64"],
476+
"filename": "package-0.7.0-py3-none-any.whl",
483477
"python_interpreter_target": "unit_test_interpreter_target",
484478
# NOTE(hartikainen): Perhaps this is part of the problem?
485-
# This should say `jax[cuda12]==0.7.0` for `linux_x86_64` platform and
486-
# `jax==0.7.0` for `linux_arm64` and `osx_aarch64`.
487-
"requirement": "jax[cuda12]==0.7.0",
479+
# This should say `package[extra]==0.7.0` for `linux_x86_64` platform and
480+
# `package==0.7.0` for `linux_arm64`
481+
"requirement": "package[extra]==0.7.0",
488482
"sha256": "62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76",
489-
"urls": ["https://example.com/jax-0.7.0-py3-none-any.whl"],
483+
"urls": ["https://example.com/package-0.7.0-py3-none-any.whl"],
490484
},
491485
})
492486
pypi.whl_mods().contains_exactly({})

0 commit comments

Comments
 (0)