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"