Skip to content

Commit

Permalink
build: add support for Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
uniqueg committed May 24, 2022
1 parent f10f2c8 commit cbacc9e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -59,7 +59,8 @@ jobs:
python-version-tag: [
["3.7", ""],
["3.8", ""],
["3.9", "latest"]
["3.9", ""],
["3.10", "latest"]
]

steps:
Expand Down
50 changes: 50 additions & 0 deletions docker/Dockerfile_py3.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM python:3.10-slim-buster as base

# Metadata
LABEL software="FOCA"
LABEL software.description="Kickstart OpenAPI-based microservice development with Flask & Connexion"
LABEL software.website="/~https://github.com/elixir-cloud-aai/foca"
LABEL software.license="https://spdx.org/licenses/Apache-2.0"
LABEL maintainer="alexander.kanitz@alumni.ethz.ch"
LABEL maintainer.organisation="ELIXIR Cloud & AAI"

# Build image
FROM base as builder

# Install general dependencies
ENV PACKAGES openssl git build-essential python3-dev curl jq
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app

# Install Python dependencies
COPY requirements.txt ./
RUN pip install \
--no-warn-script-location \
--prefix="/install" \
-r requirements.txt

# Install FOCA
COPY setup.py README.md ./
COPY foca/ ./foca/
RUN pip install . \
--no-warn-script-location \
--prefix="/install"

# Final image
FROM base

# Python UserID workaround for OpenShift/K8S
ENV LOGNAME=ipython
ENV USER=ipython
ENV HOME=/tmp/user

# Install general dependencies
ENV PACKAGES openssl git build-essential python3-dev curl jq
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
rm -rf /var/lib/apt/lists/*

# Copy Python packages
COPY --from=builder /install /usr/local
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Internet :: WWW/HTTP",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
Expand Down

0 comments on commit cbacc9e

Please sign in to comment.