From d52ce3ffee8c2d619a99fc44b262b6f6a3c841f6 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Fri, 8 Aug 2025 13:00:51 -0400 Subject: [PATCH] dynamic version + copy src before pip install --- Dockerfile | 8 ++++---- pyproject.toml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8dae8844..10bf6089 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,15 +23,15 @@ WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -# Install python core package +# Copy source code and package configuration COPY pyproject.toml . +COPY src/ ./src/ + +# Install python core package with setuptools-scm version override RUN pip install . # Install gunicorn for production WSGI server RUN pip install gunicorn - -# Copy backend source code -COPY src/ ./src/ # COPY *.py ./ # Copy built frontend from previous stage diff --git a/pyproject.toml b/pyproject.toml index 63ab43b7..6df4a3f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "fuel-cycle-sim" -version = "0.1.0" +dynamic = ["version"] description = "A Python package for fuel cycle simulation with pathsim integration" readme = "README.md" license = {file = "LICENSE"} @@ -46,8 +46,8 @@ Issues = "https://github.com/yourusername/fuel-cycle-sim/issues" packages = ["fuel_cycle_sim"] package-dir = {"fuel_cycle_sim" = "src/python"} -[tool.setuptools_scm] -write_to = "src/python/_version.py" - [tool.setuptools.package-data] fuel_cycle_sim = ["templates/*"] + +[tool.setuptools_scm] +write_to = "src/python/_version.py"