From 56b9bdb2822b827d9186bf10543a9c14db9a45d4 Mon Sep 17 00:00:00 2001 From: Cooper Ry Lees Date: Sun, 22 Oct 2023 13:36:19 -0700 Subject: [PATCH] Add env var, extra deps + better glob to get compiled wheel only for pip install - Also install uvloop --- CHANGES.md | 1 + Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cb728c1b6a1..23b11688369 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,7 @@ ### Packaging + - Change Dockerfile to hatch + compile black (#3965) ### Parser diff --git a/Dockerfile b/Dockerfile index d7e58a38b1c..8a70db80dcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,14 @@ FROM python:3.11-slim AS builder RUN mkdir /src COPY . /src/ ENV VIRTUAL_ENV=/opt/venv +ENV HATCH_BUILD_HOOKS_ENABLE=1 # Install build tools to compile dependencies that don't have prebuilt wheels RUN apt update && apt install -y build-essential git python3-dev RUN python -m venv $VIRTUAL_ENV -RUN python -m pip install --no-cache-dir hatch +RUN python -m pip install --no-cache-dir hatch hatch-fancy-pypi-readme hatch-vcs RUN . /opt/venv/bin/activate && pip install --no-cache-dir --upgrade pip setuptools \ && cd /src && hatch build -t wheel \ - && pip install --no-cache-dir dist/*[colorama,d] + && pip install --no-cache-dir dist/*-cp*[colorama,d,uvloop] FROM python:3.11-slim