diff --git a/debian/compat b/debian/compat index 45a4fb7..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/debian/control b/debian/control index 952b5cb..19f9f3f 100644 --- a/debian/control +++ b/debian/control @@ -1,26 +1,25 @@ Source: petale -Maintainer: Josue Kouka +Maintainer: Benjamin Dauvergne Section: python Priority: optional -Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 7), python-django, dh-systemd, dh-python +Build-Depends: python3-setuptools, python3-all, debhelper (>= 9), python3-django, dh-systemd, dh-python Standards-Version: 3.9.6 -X-Python-Version: >= 2.7 -Package: python-petale +Package: python3-petale Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, - python-django (>= 1.8), - python-django-jsonfield, - python-djangorestframework, - python-requests, +Depends: ${misc:Depends}, ${python3:Depends}, + python3-django (>= 1.11), + python3-django-jsonfield, + python3-djangorestframework, + python3-requests, Description: Simple key value datastore Package: petale Architecture: all Depends: ${misc:Depends}, - python-petale (= ${binary:Version}), - python-psycopg2, + python3-petale (= ${binary:Version}), + python3-psycopg2, uwsgi, - uwsgi-plugin-python + uwsgi-plugin-python3 Recommends: nginx Description: Simple key value datastore diff --git a/debian/petale-manage b/debian/petale-manage index 47494ef..073cb74 100755 --- a/debian/petale-manage +++ b/debian/petale-manage @@ -18,9 +18,9 @@ fi if test $# -eq 0 then - python ${MANAGE} help + python3 ${MANAGE} help exit 1 fi -python ${MANAGE} "$@" +python3 ${MANAGE} "$@" diff --git a/debian/petale.service b/debian/petale.service index 063b02d..f3d206a 100644 --- a/debian/petale.service +++ b/debian/petale.service @@ -5,6 +5,7 @@ Wants=postgresql.service [Service] Environment=PETALE_SETTINGS_FILE=/usr/lib/%p/debian_config.py +Environment=LANG=C.UTF-8 User=%p Group=%p ExecStartPre=/usr/bin/petale-manage migrate --noinput diff --git a/debian/python-petale.dirs b/debian/python-petale.dirs deleted file mode 100644 index a85fb63..0000000 --- a/debian/python-petale.dirs +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/petale diff --git a/debian/python-petale.install b/debian/python-petale.install deleted file mode 100644 index f66a9ce..0000000 --- a/debian/python-petale.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin/manage.py /usr/lib/petale -usr/lib/python2*/*-packages diff --git a/debian/python-petale.docs b/debian/python3-petale.docs similarity index 100% rename from debian/python-petale.docs rename to debian/python3-petale.docs diff --git a/debian/rules b/debian/rules index 83aef84..1101993 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,12 @@ #!/usr/bin/make -f # -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export PYBUILD_DISABLE=test +export PYBUILD_NAME=petale %: - dh $@ --with python2,systemd + dh $@ --with python3,systemd --buildsystem=pybuild + +override_dh_install: + mv $(CURDIR)/debian/python3-petale/usr/bin/manage.py debian/petale/usr/lib/petale/ + dh_install diff --git a/debian/uwsgi.ini b/debian/uwsgi.ini index f7215ee..8a26850 100644 --- a/debian/uwsgi.ini +++ b/debian/uwsgi.ini @@ -2,7 +2,7 @@ auto-procname = true procname-prefix-spaced = petale -plugin = python +plugin = python3 module = petale.wsgi:application http-socket = /run/petale/petale.sock @@ -12,9 +12,17 @@ vacuum = true master = true processes = 5 harakiri = 30 +enable-threads = true +max-requests = 500 +max-worker-lifetime = 7200 buffer-size = 32768 +py-tracebacker = /run/petale/py-tracebacker.sock. +stats = /run/petale/stats.sock + +ignore-sigpipe = true + if-file = /etc/petale/uwsgi-local.ini include = /etc/petale/uwsgi-local.ini endif =