Skip to content

Commit

Permalink
Fix dependencies in python 3.10 (zoneinfo / tzdata) (#587)
Browse files Browse the repository at this point in the history
* dependencies in 3.10
  • Loading branch information
submarcos authored Oct 7, 2024
1 parent ee01d24 commit f67c702
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

2.2.4 (2024-10-04)
-------------------------

* Fix dependencies with python 3.10


2.2.3 (2024-10-04)
-------------------------

Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM ubuntu:jammy AS base
ARG BASE_IMAGE=jammy

FROM ubuntu:${BASE_IMAGE} AS base

ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
ENV TZ=UTC
ENV COLLECTSTATIC=1
ENV TIMEOUT=60
ENV WORKERS=1
Expand Down Expand Up @@ -71,14 +74,14 @@ ARG NODE_ENV=production

RUN apt-get -qq update && apt-get install -qq -y \
build-essential \
python3.10-dev python3.10-venv python3.10-distutils libmagic1 && \
python3-dev python3-venv python3-distutils libmagic1 && \
apt-get clean all && rm -rf /var/apt/lists/* && rm -rf /var/cache/apt/*

# install pip & requirements
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && rm get-pip.py

USER django
RUN python3.10 -m venv /app/venv
RUN python3 -m venv /app/venv
RUN /app/venv/bin/pip3 install --no-cache-dir pip setuptools wheel -U

COPY requirements.txt /app/
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
version: '3.4'
services:
web:
build:
context: .
target: dev
args:
- NODE_ENV=development
NODE_ENV: development
BASE_IMAGE: focal

volumes:
- ./src/:/app/src/
ports:
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pyproject-hooks==1.0.0
# pip-tools
python-magic==0.4.27
# via -r requirements-dev.in
sqlparse==0.5.0
sqlparse==0.5.1
# via
# -c ./requirements.txt
# django
Expand Down
8 changes: 6 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#
asgiref==3.8.1
# via django
backports.zoneinfo==0.2.1;python_version<"3.9"
# via django
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# django
# screamshotter (setup.py)
certifi==2024.8.30
# via
# requests
Expand Down Expand Up @@ -52,6 +54,8 @@ sqlparse==0.5.1
# via django
typing-extensions==4.12.2
# via asgiref
tzdata==2024.2
# via screamshotter (setup.py)
uritemplate==4.1.1
# via coreapi
urllib3==2.2.3
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
scripts=['src/manage.py'],
install_requires=[
'django==4.2.*',
'backports.zoneinfo==0.2.1;python_version<"3.9"',
'tzdata',
'nodeenv',
'djangorestframework',
'coreapi',
Expand Down

0 comments on commit f67c702

Please sign in to comment.