Skip to content

Commit 5893f41

Browse files
committed
Unset global SCM version during Bloom image sync
1 parent eb9e898 commit 5893f41

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ RUN apt-get update \
1515
&& apt-get install -y --no-install-recommends build-essential ca-certificates git libpq-dev \
1616
&& rm -rf /var/lib/apt/lists/*
1717
COPY pyproject.toml uv.lock README.md ./
18-
RUN uv sync --frozen --no-dev --no-install-project
18+
RUN unset SETUPTOOLS_SCM_PRETEND_VERSION && uv sync --frozen --no-dev --no-install-project
1919

2020
COPY config ./config
2121
COPY auth ./auth
2222
COPY bloom_lims ./bloom_lims
2323
COPY main.py ./main.py
2424
COPY static ./static
2525
COPY templates ./templates
26-
RUN uv sync --frozen --no-dev
26+
RUN unset SETUPTOOLS_SCM_PRETEND_VERSION && uv sync --frozen --no-dev
2727

2828
FROM python:${PYTHON_VERSION}-slim-bookworm AS runtime
2929

tests/test_packaging_metadata.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_dockerfile_installs_git_before_git_pinned_dependencies() -> None:
3838
encoding="utf-8"
3939
)
4040

41-
first_uv_sync = dockerfile.index("RUN uv sync")
41+
first_uv_sync = dockerfile.index("uv sync")
4242
git_install = dockerfile.index("git")
4343
assert git_install < first_uv_sync
4444

@@ -53,3 +53,4 @@ def test_dockerfile_uses_package_specific_scm_version() -> None:
5353
"ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BLOOM_LIMS=${SETUPTOOLS_SCM_PRETEND_VERSION}"
5454
in dockerfile
5555
)
56+
assert dockerfile.count("unset SETUPTOOLS_SCM_PRETEND_VERSION && uv sync") == 2

0 commit comments

Comments
 (0)