Skip to content

Commit

Permalink
Merge pull request #296 from kitware-resonant/fix-dockerfile-setup
Browse files Browse the repository at this point in the history
Copy pyproject.toml (instead of setup.py) during docker image build
  • Loading branch information
brianhelba authored Feb 7, 2025
2 parents 7d29b8b + 895d245 commit bd39b88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions {{ cookiecutter.project_slug }}/dev/django.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ FROM python:3.13-slim
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Only copy the setup.py, it will still force all install_requires to be installed,
# Only copy the pyproject.toml, it will still force all install_requires to be installed,
# but find_packages() will find nothing (which is fine). When Docker Compose mounts the real source
# over top of this directory, the .egg-link in site-packages resolves to the mounted directory
# and all package modules are importable.
COPY ./setup.py /opt/django-project/setup.py
COPY ./pyproject.toml /opt/django-project/pyproject.toml
RUN pip install --editable /opt/django-project[dev]

# Use a directory name which will never be an import name, as isort considers this as first-party.
Expand Down

0 comments on commit bd39b88

Please sign in to comment.