Fix Python packaging for Python 3.12 (#79)

* Translate setup.py to pyproject.toml

* Introduce PEP518 by using Poetry as package manager
* Introduce PEP402-ish package structure
* Remove requirements.txt and setup.py
* Update Dockerfile and Docs for new packaging method

* Bump dependencies, remove six

six is no longer necessary as of docker-py 5.0.1 (see https://github.com/docker/docker-py/pull/2863)
This commit is contained in:
Konstantin Köhring
2024-11-13 18:17:10 +01:00
committed by GitHub
parent 9ac4048783
commit 6c70d7c75f
8 changed files with 369 additions and 34 deletions

View File

@@ -1,10 +1,11 @@
FROM python:3-alpine
LABEL org.opencontainers.image.source https://github.com/Red5d/docker-autocompose
FROM python:3.12-alpine
LABEL org.opencontainers.image.source=https://github.com/Red5d/docker-autocompose
WORKDIR /usr/src/app
ENTRYPOINT [ "poetry", "run", "autocompose" ]
COPY . .
RUN apk add --no-cache poetry
RUN python ./setup.py install
COPY poetry.lock pyproject.toml README.md ./
COPY src ./src
ENTRYPOINT [ "python", "./autocompose.py" ]
RUN poetry install