Skip to content

Commit

Permalink
Fix 3.10 compatibility (#60)
Browse files Browse the repository at this point in the history
* fix: py 3.10 compatibility

* build: bump up to 0.2.1

* build: reduce image size
  • Loading branch information
isac322 authored May 3, 2022
1 parent a5c0923 commit 962ce92
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ FROM python:3.10.4-alpine AS builder
RUN apk add --update --no-cache gcc musl-dev libffi-dev openssl-dev make cargo
RUN pip install --no-cache-dir build
COPY . /src
RUN python -m build --wheel /src
RUN pip wheel --no-cache-dir /src/dist/*.whl --wheel-dir /tmp/wheels
RUN python -m build --wheel -o /tmp/dist /src
RUN \
--mount=type=cache,target=/root/.cache/pip \
pip wheel /tmp/dist/*.whl --wheel-dir /wheel

FROM python:3.10.4-alpine

MAINTAINER 'Byeonghoon Isac Yoo <[email protected]>'

COPY --from=builder /tmp/wheels/* /tmp/wheels/
RUN pip install /tmp/wheels/*.whl && rm -rf /tmp
RUN \
--mount=type=bind,target=/wheel,from=builder,source=/wheel \
--mount=type=bind,target=/tmp/wheel,from=builder,source=/tmp/dist \
pip install \
--no-cache-dir \
--no-index \
--find-links=/wheel \
/tmp/wheel/*.whl

ENTRYPOINT ["/usr/local/bin/get_oracle_a1"]
Empty file removed get_oracle_a1/exceptions.py
Empty file.
2 changes: 1 addition & 1 deletion get_oracle_a1/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections import Iterable, Sequence
from collections.abc import Iterable, Sequence
from functools import cache
from pathlib import Path
from typing import Optional
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[tool.poetry]
name = "get_oracle_a1"
version = "0.2.0"
version = "0.2.1"
description = ""
authors = ["Byeonghoon Yoo <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 962ce92

Please sign in to comment.