File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
docs/usage_and_configuration Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 23
23
24
24
<!-- Changes to how Black is packaged, such as dependency requirements -->
25
25
26
+ - Change Dockerfile to hatch + compile black (#3965 )
27
+
26
28
### Parser
27
29
28
30
<!-- Changes to the parser or to version autodetection -->
Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ FROM python:3.11-slim AS builder
3
3
RUN mkdir /src
4
4
COPY . /src/
5
5
ENV VIRTUAL_ENV=/opt/venv
6
+ ENV HATCH_BUILD_HOOKS_ENABLE=1
7
+ # Install build tools to compile black + dependencies
8
+ RUN apt update && apt install -y build-essential git python3-dev
6
9
RUN python -m venv $VIRTUAL_ENV
7
- RUN . /opt/venv/bin/activate && pip install --no-cache-dir --upgrade pip setuptools wheel \
8
- # Install build tools to compile dependencies that don't have prebuilt wheels
9
- && apt update && apt install -y git build-essential \
10
- && cd /src \
11
- && pip install --no-cache-dir .[colorama,d]
10
+ RUN python -m pip install --no-cache-dir hatch hatch-fancy-pypi-readme hatch-vcs
11
+ RUN . /opt/venv/bin/activate && pip install --no-cache-dir --upgrade pip setuptools \
12
+ && cd /src && hatch build -t wheel \
13
+ && pip install --no-cache-dir dist/*-cp*[colorama,d,uvloop]
12
14
13
15
FROM python:3.11-slim
14
16
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ created for all unreleased
24
24
[ commits on the ` main ` branch] ( https://github.com/psf/black/commits/main ) . This tag is
25
25
not meant to be used by external users.
26
26
27
+ From version 23.11.0 the Docker image installs a compiled black into the image.
28
+
27
29
## Usage
28
30
29
31
A permanent container doesn't have to be created to use _ Black_ as a Docker image. It's
You can’t perform that action at this time.
0 commit comments