Skip to content

Commit eb9e898

Browse files
committed
Scope Docker SCM version to Bloom package
1 parent b941e4c commit eb9e898

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG PYTHON_VERSION=3.12
44
FROM ghcr.io/astral-sh/uv:0.5.30-python${PYTHON_VERSION}-bookworm-slim AS builder
55

66
ARG SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0
7-
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION} \
7+
ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BLOOM_LIMS=${SETUPTOOLS_SCM_PRETEND_VERSION} \
88
UV_COMPILE_BYTECODE=1 \
99
UV_LINK_MODE=copy \
1010
PYTHONDONTWRITEBYTECODE=1 \

tests/test_packaging_metadata.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,15 @@ def test_dockerfile_installs_git_before_git_pinned_dependencies() -> None:
4141
first_uv_sync = dockerfile.index("RUN uv sync")
4242
git_install = dockerfile.index("git")
4343
assert git_install < first_uv_sync
44+
45+
46+
def test_dockerfile_uses_package_specific_scm_version() -> None:
47+
dockerfile = (Path(__file__).resolve().parents[1] / "Dockerfile").read_text(
48+
encoding="utf-8"
49+
)
50+
51+
assert "ENV SETUPTOOLS_SCM_PRETEND_VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION}" not in dockerfile
52+
assert (
53+
"ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BLOOM_LIMS=${SETUPTOOLS_SCM_PRETEND_VERSION}"
54+
in dockerfile
55+
)

0 commit comments

Comments
 (0)