From 97e97416410b479c438ec5d7cc76309b8e127cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 20 Aug 2019 20:39:15 +0200 Subject: [PATCH] debian: switch to Python 3 (#35492) --- debian/chrono.install | 1 - debian/control | 34 +++++++++---------- debian/python-chrono.dirs | 1 - debian/python-chrono.install | 1 - ...python-chrono.docs => python3-chrono.docs} | 0 debian/rules | 9 +++-- debian/uwsgi.ini | 2 +- 7 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 debian/python-chrono.dirs delete mode 100644 debian/python-chrono.install rename debian/{python-chrono.docs => python3-chrono.docs} (100%) diff --git a/debian/chrono.install b/debian/chrono.install index cb57e7b0..b703f569 100644 --- a/debian/chrono.install +++ b/debian/chrono.install @@ -3,4 +3,3 @@ debian/chrono-manage /usr/bin debian/settings.py /etc/chrono debian/uwsgi.ini /etc/chrono debian/debian_config.py /usr/lib/chrono -usr/bin/manage.py /usr/lib/chrono diff --git a/debian/control b/debian/control index c73dff4d..152dfd97 100644 --- a/debian/control +++ b/debian/control @@ -2,32 +2,30 @@ Source: chrono Maintainer: Frederic Peters Section: python Priority: optional -Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), python-django, debhelper (>= 9), dh-python, dh-systemd, ruby-sass +Build-Depends: python3-setuptools, python3-all, python3-django, debhelper (>= 9), dh-python, dh-systemd, ruby-sass Standards-Version: 3.9.6 -X-Python-Version: >= 2.7 -Package: python-chrono +Package: python3-chrono Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, - python-django (>= 1:1.11), - python-gadjo, - python-requests -Recommends: python-django-mellon -Breaks: chrono (<<0.84.post6) -Description: Agendas System (Python module) +Depends: ${misc:Depends}, ${python3:Depends}, + python3-django (>= 1:1.11), + python3-gadjo, + python3-requests +Recommends: python3-django-mellon +Description: Agendas System (Python 3 module) Package: chrono Architecture: all Depends: ${misc:Depends}, - python-chrono (= ${binary:Version}), - python-hobo, - python-vobject, - python-django-tenant-schemas, - python-psycopg2, - python-django-mellon, - python-dateutil, + python3-chrono (= ${binary:Version}), + python3-hobo, + python3-vobject, + python3-django-tenant-schemas, + python3-psycopg2, + python3-django-mellon, + python3-dateutil, uwsgi, - uwsgi-plugin-python + uwsgi-plugin-python3 Recommends: nginx Suggests: postgresql Breaks: python-chrono (<<0.84.post6) diff --git a/debian/python-chrono.dirs b/debian/python-chrono.dirs deleted file mode 100644 index 8850597b..00000000 --- a/debian/python-chrono.dirs +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/chrono diff --git a/debian/python-chrono.install b/debian/python-chrono.install deleted file mode 100644 index 5fda4d4e..00000000 --- a/debian/python-chrono.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/python2*/*-packages diff --git a/debian/python-chrono.docs b/debian/python3-chrono.docs similarity index 100% rename from debian/python-chrono.docs rename to debian/python3-chrono.docs diff --git a/debian/rules b/debian/rules index 83aef84d..878341cd 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,11 @@ #!/usr/bin/make -f # -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export PYBUILD_NAME=chrono %: - dh $@ --with python2,systemd + dh $@ --with python3,systemd --buildsystem=pybuild + +override_dh_install: + dh_install + mv $(CURDIR)/debian/python3-chrono/usr/bin/manage.py $(CURDIR)/debian/chrono/usr/lib/chrono/manage.py diff --git a/debian/uwsgi.ini b/debian/uwsgi.ini index ecfb5d55..cb2d9374 100644 --- a/debian/uwsgi.ini +++ b/debian/uwsgi.ini @@ -2,7 +2,7 @@ auto-procname = true procname-prefix-spaced = chrono -plugin = python +plugin = python3 module = chrono.wsgi:application http-socket = /run/chrono/chrono.sock