From 24627921408e73694b812ceafa04d904443e593c Mon Sep 17 00:00:00 2001 From: Jakub Drobena Date: Mon, 2 Sep 2024 11:49:01 +0200 Subject: [PATCH] setuptools update --- Dockerfile | 20 ++++++++------------ pyproject.toml | 2 +- requirements.txt | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 93f4c5c..a9cdf55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Stage 1: Base +# Stage 1: Base and Build FROM registry.access.redhat.com/ubi9-minimal:latest AS base ENV VENV=/ccx-messaging-venv \ @@ -12,27 +12,23 @@ RUN curl -ksL https://certs.corp.redhat.com/certs/2015-IT-Root-CA.pem -o /etc/pk curl -ksL https://certs.corp.redhat.com/certs/2022-IT-Root-CA.pem -o /etc/pki/ca-trust/source/anchors/2022-IT-Root-CA.pem && \ update-ca-trust -RUN microdnf install --nodocs -y python3.11 unzip tar git-core && \ - python3.11 -m venv $VENV && \ - pip install --no-cache-dir -U pip - -# Stage 2: Builder -FROM base AS builder - COPY . $HOME -RUN pip install --no-cache-dir -r requirements.txt && \ +RUN microdnf install --nodocs -y python3.11 unzip tar git-core && \ + python3.11 -m venv $VENV && \ + pip install --no-cache-dir -U pip && \ + pip install --no-cache-dir -r requirements.txt && \ pip install --no-cache-dir . -# Stage 3: Final + +# Stage 2: Final FROM base AS final RUN microdnf remove -y git-core && \ microdnf clean all && \ rpm -e --nodeps sqlite-libs krb5-libs libxml2 readline pam openssh openssh-clients -COPY --from=builder $VENV $VENV -COPY --from=builder $HOME $HOME + RUN chmod -R g=u $HOME $VENV /etc/passwd && \ chgrp -R 0 $HOME $VENV diff --git a/pyproject.toml b/pyproject.toml index b2b9627..a810ab1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=64", "setuptools_scm>=8"] +requires = ["setuptools>=70", "setuptools_scm>=8"] build-backend = "setuptools.build_meta" [project] diff --git a/requirements.txt b/requirements.txt index aceee31..a5e0c59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,6 @@ PyYAML>=6.0 requests>=2.31.0 sentry-sdk>=1.37.1 watchtower>=3.0.0 - +setuptools>=70.0.0 aiobotocore==2.14.0 s3fs==2024.6.1