-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 docker/docker-py#2863)
- Loading branch information
Showing
8 changed files
with
369 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[tool.poetry] | ||
name = "docker-autocompose" | ||
version = "1.3.0" | ||
description = "Generate a docker-compose yaml definition from a running container" | ||
authors = ["Red5d"] | ||
keywords = ["docker", "yaml", "container"] | ||
license = "GPLv2" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: System Administrators", | ||
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Utilities" | ||
] | ||
homepage = "https://github.com/Red5d/docker-autocompose" | ||
documentation = "https://github.com/Red5d/docker-autocompose/blob/master/README.md" | ||
repository = "https://github.com/Red5d/docker-autocompose.git" | ||
readme = "README.md" | ||
packages = [ | ||
{ include = "src" } | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
# see https://python-poetry.org/docs/dependency-specification/ for version specifiers | ||
python = ">=3.8" | ||
pyaml = "~24.9.0" | ||
docker = "~7.1.0" | ||
|
||
[tool.poetry.scripts] | ||
autocompose = "src.autocompose:main" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
This file was deleted.
Oops, something went wrong.
Empty file.
File renamed without changes.