fix(packaging): bound the NeMo Relay dependency

Signed-off-by: Alex Fournier <afournier@nvidia.com>
This commit is contained in:
Alex Fournier 2026-07-20 11:02:28 -07:00
parent a15b98f414
commit 9ab62e8b21
3 changed files with 8 additions and 8 deletions

View file

@ -138,10 +138,10 @@ dependencies = [
# Hence the ``sys_platform == 'win32'`` marker: the dep (and its portalocker
# / pywin32 tree) ships only where it's actually used.
"concurrent-log-handler==0.9.29; sys_platform == 'win32'",
# First-party lifecycle and shared-metrics runtime. Relay 0.5 publishes
# native wheels for these targets only; keep unsupported Hermes targets
# installable without moving Relay back behind a user-selected extra.
"nemo-relay==0.5.0; (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'linux' and platform_machine == 'x86_64') or (sys_platform == 'linux' and platform_machine == 'aarch64') or (sys_platform == 'win32' and platform_machine == 'AMD64') or (sys_platform == 'win32' and platform_machine == 'ARM64')",
# First-party lifecycle and shared-metrics runtime. Follow the contribution
# policy's bounded pre-1.0 range while supporting Relay 0.5 and 0.6. Native
# wheels target these platforms; keep unsupported Hermes targets installable.
"nemo-relay>=0.5,<0.7; (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'linux' and platform_machine == 'x86_64') or (sys_platform == 'linux' and platform_machine == 'aarch64') or (sys_platform == 'win32' and platform_machine == 'AMD64') or (sys_platform == 'win32' and platform_machine == 'ARM64')",
]
[project.optional-dependencies]

View file

@ -230,17 +230,17 @@ def test_feishu_extra_includes_qrcode_for_qr_login():
assert any(dep.startswith("qrcode") for dep in feishu_extra)
def test_nemo_relay_is_a_pinned_core_dependency():
def test_nemo_relay_is_a_bounded_core_dependency():
metadata = _load_project()
relay_dependencies = [
dependency
for dependency in metadata["dependencies"]
if dependency.startswith("nemo-relay==")
if dependency.startswith("nemo-relay")
]
assert len(relay_dependencies) == 1
requirement = Requirement(relay_dependencies[0])
assert str(requirement.specifier) == "==0.5.0"
assert str(requirement.specifier) == "<0.7,>=0.5"
assert requirement.marker is not None
assert requirement.marker.evaluate(
{"sys_platform": "darwin", "platform_machine": "arm64"}

2
uv.lock generated
View file

@ -1802,7 +1802,7 @@ requires-dist = [
{ name = "microsoft-teams-apps", marker = "extra == 'teams'", specifier = "==2.0.13.4" },
{ name = "mistralai", marker = "extra == 'mistral'", specifier = "==2.4.8" },
{ name = "modal", marker = "extra == 'modal'", specifier = "==1.3.4" },
{ name = "nemo-relay", marker = "(platform_machine == 'arm64' and sys_platform == 'darwin') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32') or (platform_machine == 'ARM64' and sys_platform == 'win32')", specifier = "==0.5.0" },
{ name = "nemo-relay", marker = "(platform_machine == 'arm64' and sys_platform == 'darwin') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine == 'AMD64' and sys_platform == 'win32') or (platform_machine == 'ARM64' and sys_platform == 'win32')", specifier = ">=0.5,<0.7" },
{ name = "numpy", marker = "extra == 'voice'", specifier = "==2.4.3" },
{ name = "openai", specifier = "==2.24.0" },
{ name = "packaging", specifier = "==26.0" },