debian: python3 packaging (#41374)

This commit is contained in:
Benjamin Dauvergne 2020-04-06 12:52:32 +02:00
parent e030f6723f
commit 93ccbc1c39
9 changed files with 31 additions and 22 deletions

2
debian/compat vendored
View File

@ -1 +1 @@
8
9

23
debian/control vendored
View File

@ -1,26 +1,25 @@
Source: petale
Maintainer: Josue Kouka <jkouka@entrouvert.org>
Maintainer: Benjamin Dauvergne <bdauvergne@entrouvert.org>
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

View File

@ -18,9 +18,9 @@ fi
if test $# -eq 0
then
python ${MANAGE} help
python3 ${MANAGE} help
exit 1
fi
python ${MANAGE} "$@"
python3 ${MANAGE} "$@"

View File

@ -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

View File

@ -1 +0,0 @@
/usr/lib/petale

View File

@ -1,2 +0,0 @@
usr/bin/manage.py /usr/lib/petale
usr/lib/python2*/*-packages

10
debian/rules vendored
View File

@ -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

10
debian/uwsgi.ini vendored
View File

@ -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 =