From 781350928222bb7a3d0d135568aacc07b7d04a03 Mon Sep 17 00:00:00 2001 From: Aleksei Filatov Date: Mon, 23 Sep 2024 19:32:13 +0300 Subject: [PATCH 1/2] Fix TypeError: canonicalize_version() --- Dockerfile | 10 ++++++++++ Makefile | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9ae8fde --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +ARG BASE_IMAGE=python:3.10.15-bookworm +FROM $BASE_IMAGE + +ARG DEBIAN_FRONTEND=noninteractive + +# Install poetry in a unified way +COPY . ./ + +RUN make install-poetry +RUN make lint diff --git a/Makefile b/Makefile index 04045cd..a2dd707 100644 --- a/Makefile +++ b/Makefile @@ -117,6 +117,10 @@ $(INSTALL_DEPS_STAMP): $(VENV_DIR) pyproject.toml poetry.lock @if [[ -n "${UPDATE_POETRY_LOCK}" ]]; then \ $(POETRY) update --lock; \ fi + # Fix "TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'" + # Related issue https://github.com/pypa/setuptools/issues/4483 + # TODO: Try to remove this workaround after upgrading Poetry and Python version + $(VENV_DIR)/bin/pip install "setuptools<71" $(POETRY) install --no-root touch $(INSTALL_DEPS_STAMP) From c99ba1997191b821cf9f75e1b25209ed0bd652de Mon Sep 17 00:00:00 2001 From: Aleksei Filatov Date: Mon, 23 Sep 2024 19:43:32 +0300 Subject: [PATCH 2/2] Remove test dockerfile --- Dockerfile | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9ae8fde..0000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG BASE_IMAGE=python:3.10.15-bookworm -FROM $BASE_IMAGE - -ARG DEBIAN_FRONTEND=noninteractive - -# Install poetry in a unified way -COPY . ./ - -RUN make install-poetry -RUN make lint