Skip to content

Commit 9616e8d

Browse files
committed
fix: restore SDK wheel install path for CI
Editable install fails in CI because setuptools_scm needs a full git checkout. Use the pre-built wheel from dist/ when available, fall back to editable install only for local dev.
1 parent 74f3e8c commit 9616e8d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

noxfile.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,14 @@ def _install_coglet(session: nox.Session) -> None:
6868
def _install_package(session: nox.Session) -> None:
6969
"""Install the cog SDK and coglet dependency."""
7070
_install_coglet(session)
71-
# Always use editable install for the SDK so tests run against
72-
# the working tree, not a stale wheel from a previous build.
73-
session.install("-e", ".")
71+
whl = _find_compatible_wheel("dist/cog-*.whl")
72+
if whl:
73+
session.install(whl)
74+
else:
75+
# No pre-built wheel — editable install from source.
76+
# This fails in CI (setuptools_scm needs a full git checkout),
77+
# so CI must run build:sdk first.
78+
session.install("-e", ".")
7479

7580

7681
@nox.session(python=PYTHON_VERSIONS)

0 commit comments

Comments
 (0)