Merge pull request #262 from ewalk153/increase-min-py-version

Raise minimum python version to 3.7
pull/289/head
Rui Carmo 2023-03-23 08:35:20 +00:00 zatwierdzone przez GitHub
commit f49b83e54d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
5 zmienionych plików z 14 dodań i 14 usunięć

Wyświetl plik

@ -4,13 +4,13 @@ on: [push, pull_request]
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
strategy: strategy:
max-parallel: 3 max-parallel: 3
matrix: matrix:
# This is currently overkill since we are targeting 3.5 # This range ensures coding standard does not conflict with
# but affords us visibility onto syntax changes in newer Pythons # changes in newer Pythons
python-version: [3.6, 3.7, 3.8, 3.9] python-version: [3.7, 3.8, 3.9, "3.10"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

Wyświetl plik

@ -1,4 +1,4 @@
FROM ubuntu:bionic FROM ubuntu:jammy
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive

Wyświetl plik

@ -8,7 +8,7 @@ jobs:
strategy: strategy:
max-parallel: 4 max-parallel: 4
matrix: matrix:
distro: [ buster, bionic, focal ] distro: [ buster, jammy, focal, bullseye ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

Wyświetl plik

@ -1,8 +1,8 @@
# Installation on Ubuntu 18.04 LTS (Bionic) # Installation on Ubuntu 22.04 LTS (Jammy)
> This is a standalone, distribution-specific version of `INSTALL.md`. You do not need to read or follow the original file, but can refer to it for generic steps like setting up SSH keys (which are assumed to be common knowledge here) > This is a standalone, distribution-specific version of `INSTALL.md`. You do not need to read or follow the original file, but can refer to it for generic steps like setting up SSH keys (which are assumed to be common knowledge here)
`piku` setup is simplified in Bionic, since it can take advantage of some packaging improvements in [uWSGI][uwsgi] and does not require a custom `systemd` service. Since Bionic also ships with Python 3.6, this is an ideal environment for new deployments on both Intel and ARM devices. `piku` setup is simplified in Jammy, since it can take advantage of some packaging improvements in [uWSGI][uwsgi] and does not require a custom `systemd` service. Since Jammy also ships with Python 3.10, this is an ideal environment for new deployments on both Intel and ARM devices.
## Dependencies ## Dependencies
@ -12,10 +12,10 @@ Before installing `piku`, you need to install the following packages:
sudo apt-get update sudo apt-get update
sudo apt-get install -y build-essential certbot git \ sudo apt-get install -y build-essential certbot git \
libjpeg-dev libxml2-dev libxslt1-dev zlib1g-dev nginx \ libjpeg-dev libxml2-dev libxslt1-dev zlib1g-dev nginx \
python-certbot-nginx python-dev python-pip python-virtualenv \ python3-certbot-nginx \
python3-dev python3-pip python3-click python3-virtualenv \ python3-dev python3-pip python3-click python3-virtualenv \
uwsgi uwsgi-plugin-asyncio-python3 uwsgi-plugin-gevent-python \ uwsgi uwsgi-plugin-asyncio-python3 uwsgi-plugin-gevent-python3 \
uwsgi-plugin-python uwsgi-plugin-python3 uwsgi-plugin-tornado-python uwsgi-plugin-python3 uwsgi-plugin-tornado-python3
``` ```
## Setting up the `piku` user ## Setting up the `piku` user
@ -53,7 +53,7 @@ Setting '/home/piku/piku.py' as executable.
## uWSGI Configuration ## uWSGI Configuration
[uWSGI][uwsgi] in Bionic requires very little configuration, since it is already properly packaged. All you need to do is place a link to the `piku` configuration file in `/etc/uwsgi/apps-enabled`: [uWSGI][uwsgi] in Jammy requires very little configuration, since it is already properly packaged. All you need to do is place a link to the `piku` configuration file in `/etc/uwsgi/apps-enabled`:
```bash ```bash
sudo ln /home/$PAAS_USERNAME/.piku/uwsgi/uwsgi.ini /etc/uwsgi/apps-enabled/piku.ini sudo ln /home/$PAAS_USERNAME/.piku/uwsgi/uwsgi.ini /etc/uwsgi/apps-enabled/piku.ini

Wyświetl plik

@ -4,9 +4,9 @@
try: try:
from sys import version_info from sys import version_info
assert version_info >= (3, 5) assert version_info >= (3, 7)
except AssertionError: except AssertionError:
exit("Piku requires Python 3.5 or above") exit("Piku requires Python 3.7 or above")
from importlib import import_module from importlib import import_module
from collections import defaultdict, deque from collections import defaultdict, deque