summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-09-29 13:09:42 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-10-13 13:41:19 (GMT)
commitbaf081c2c280615bfc09ef91d043f2af24f54976 (patch)
treec064cdc5bbe232603c2570508b6c59a305ea3f37
parent848f36482d3f189b899be40a29c56dc6a9adb1d9 (diff)
downloadcombo-baf081c2c280615bfc09ef91d043f2af24f54976.zip
combo-baf081c2c280615bfc09ef91d043f2af24f54976.tar.gz
combo-baf081c2c280615bfc09ef91d043f2af24f54976.tar.bz2
debian: switch to Python 3 (#36233)
-rwxr-xr-xdebian/combo-manage5
-rw-r--r--debian/control59
-rw-r--r--debian/debian_config.py6
-rw-r--r--debian/py3dist-overrides8
-rw-r--r--debian/pydist-overrides1
-rw-r--r--debian/python-combo.install1
-rw-r--r--debian/python-combo.maintscript1
-rw-r--r--debian/python3-combo.dirs (renamed from debian/python-combo.dirs)0
-rw-r--r--debian/python3-combo.docs (renamed from debian/python-combo.docs)0
-rw-r--r--debian/python3-combo.install1
-rwxr-xr-xdebian/rules5
-rw-r--r--debian/settings.py3
-rw-r--r--debian/uwsgi.ini2
-rwxr-xr-xmanage.py2
14 files changed, 49 insertions, 45 deletions
diff --git a/debian/combo-manage b/debian/combo-manage
index 804f9b7..ace3e87 100755
--- a/debian/combo-manage
+++ b/debian/combo-manage
@@ -18,9 +18,8 @@ fi
if test $# -eq 0
then
- python ${MANAGE} help
+ python3 ${MANAGE} help
exit 1
fi
-python ${MANAGE} "$@"
-
+python3 ${MANAGE} "$@"
diff --git a/debian/control b/debian/control
index 81c7cdf..12da38f 100644
--- a/debian/control
+++ b/debian/control
@@ -2,33 +2,32 @@ Source: combo
Maintainer: Jérôme Schneider <jschneider@entrouvert.com>
Section: python
Priority: optional
-Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 9), python-django, dh-python, dh-systemd, sassc
+Build-Depends: python3-setuptools, python3-all, python3-django, debhelper (>= 9), dh-python, dh-systemd, sassc
Standards-Version: 3.9.6
-X-Python-Version: >= 2.7
-Package: python-combo
+Package: python3-combo
Architecture: all
-Depends: ${misc:Depends}, ${python:Depends},
- python-django (>= 1:1.11),
- python-djangorestframework (>= 3.3),
- python-gadjo (>= 0.53),
- python-pyproj,
- python-requests,
- python-feedparser,
- python-xstatic-josefinsans,
- python-xstatic-leaflet,
- python-xstatic-leaflet-markercluster,
- python-xstatic-opensans,
- python-xstatic-roboto-fontface (<< 0.5.0.0),
- python-eopayment (>= 1.35),
- python-django-haystack (>= 2.4.0),
- python-django-ratelimit,
- python-sorl-thumbnail,
- python-pil,
- python-pywebpush,
- python-pygal,
- python-lxml
-Recommends: python-django-mellon, python-whoosh
+Depends: ${misc:Depends}, ${python3:Depends},
+ python3-django (>= 1:1.11),
+ python3-djangorestframework (>= 3.3),
+ python3-gadjo (>= 0.53),
+ python3-pyproj,
+ python3-requests,
+ python3-feedparser,
+ python3-xstatic-josefinsans,
+ python3-xstatic-leaflet,
+ python3-xstatic-leaflet-markercluster,
+ python3-xstatic-opensans,
+ python3-xstatic-roboto-fontface (<< 0.5.0.0),
+ python3-eopayment (>= 1.35),
+ python3-django-haystack (>= 2.4.0),
+ python3-django-ratelimit,
+ python3-sorl-thumbnail,
+ python3-pil,
+ python3-pywebpush,
+ python3-pygal,
+ python3-lxml
+Recommends: python3-django-mellon, python3-whoosh
Conflicts: python-lingo
Breaks: combo (<< 2.34.post2)
Description: Portal Management System (Python module)
@@ -36,13 +35,13 @@ Description: Portal Management System (Python module)
Package: combo
Architecture: all
Depends: ${misc:Depends},
- python-combo (= ${binary:Version}),
- python-hobo (>= 0.63.1),
- python-django-tenant-schemas,
- python-psycopg2,
- python-django-mellon,
+ python3-combo (= ${binary:Version}),
+ python3-hobo (>= 1.34),
+ python3-django-tenant-schemas,
+ python3-psycopg2,
+ python3-django-mellon,
uwsgi,
- uwsgi-plugin-python
+ uwsgi-plugin-python3
Recommends: nginx
Suggests: postgresql
Breaks: python-combo (<< 2.34.post2)
diff --git a/debian/debian_config.py b/debian/debian_config.py
index 87e421b..01a7058 100644
--- a/debian/debian_config.py
+++ b/debian/debian_config.py
@@ -7,7 +7,7 @@ PROJECT_NAME = 'combo'
#
# hobotization (multitenant)
#
-execfile('/usr/lib/hobo/debian_config_common.py')
+exec(open('/usr/lib/hobo/debian_config_common.py').read())
# add custom hobo agent module
INSTALLED_APPS = ('hobo.agent.combo', ) + INSTALLED_APPS
@@ -18,7 +18,7 @@ TEMPLATES[0]['OPTIONS']['context_processors'].append('hobo.context_processors.st
#
# local settings
#
-execfile(os.path.join(ETC_DIR, 'settings.py'))
+exec(open(os.path.join(ETC_DIR, 'settings.py')).read())
# run additional settings snippets
-execfile('/usr/lib/hobo/debian_config_settings_d.py')
+exec(open('/usr/lib/hobo/debian_config_settings_d.py').read())
diff --git a/debian/py3dist-overrides b/debian/py3dist-overrides
new file mode 100644
index 0000000..dd69181
--- /dev/null
+++ b/debian/py3dist-overrides
@@ -0,0 +1,8 @@
+django_ckeditor python3-django-ckeditor
+xstatic_leaflet python3-xstatic-leaflet,
+xstatic_leaflet_markercluster python3-xstatic-leaflet-markercluster
+xstatic_josefinsans python3-xstatic-josefinsans
+xstatic_opensans python3-xstatic-opensans
+eopayment python3-eopayment
+gadjo python3-gadjo
+pywebpush python3-pywebpush
diff --git a/debian/pydist-overrides b/debian/pydist-overrides
deleted file mode 100644
index 0c6fbc3..0000000
--- a/debian/pydist-overrides
+++ /dev/null
@@ -1 +0,0 @@
-django_ckeditor python-django-ckeditor
diff --git a/debian/python-combo.install b/debian/python-combo.install
deleted file mode 100644
index 5fda4d4..0000000
--- a/debian/python-combo.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python2*/*-packages
diff --git a/debian/python-combo.maintscript b/debian/python-combo.maintscript
deleted file mode 100644
index d961888..0000000
--- a/debian/python-combo.maintscript
+++ /dev/null
@@ -1 +0,0 @@
-rm_conffile /etc/cron.hourly/python-combo 1.3-1 python-combo
diff --git a/debian/python-combo.dirs b/debian/python3-combo.dirs
index e4597bc..e4597bc 100644
--- a/debian/python-combo.dirs
+++ b/debian/python3-combo.dirs
diff --git a/debian/python-combo.docs b/debian/python3-combo.docs
index 2e3abae..2e3abae 100644
--- a/debian/python-combo.docs
+++ b/debian/python3-combo.docs
diff --git a/debian/python3-combo.install b/debian/python3-combo.install
new file mode 100644
index 0000000..8e72dc9
--- /dev/null
+++ b/debian/python3-combo.install
@@ -0,0 +1 @@
+usr/lib/python3.*
diff --git a/debian/rules b/debian/rules
index 83aef84..56d0873 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,7 @@
#!/usr/bin/make -f
# -*- makefile -*-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export PYBUILD_DISABLE=test
%:
- dh $@ --with python2,systemd
+ dh $@ --with python3,systemd --buildsystem=pybuild
diff --git a/debian/settings.py b/debian/settings.py
index d9d69bd..56ff61b 100644
--- a/debian/settings.py
+++ b/debian/settings.py
@@ -9,7 +9,8 @@
# WARNING! Quick-start development settings unsuitable for production!
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
-# This file is sourced by "execfile" from /usr/lib/combo/debian_config.py
+# This file is sourced by "exec(open(...).read())" from
+# /usr/lib/combo/debian_config.py
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
diff --git a/debian/uwsgi.ini b/debian/uwsgi.ini
index 342a093..37af66b 100644
--- a/debian/uwsgi.ini
+++ b/debian/uwsgi.ini
@@ -2,7 +2,7 @@
auto-procname = true
procname-prefix-spaced = combo
-plugin = python
+plugin = python3
module = combo.wsgi:application
http-socket = /run/combo/combo.sock
diff --git a/manage.py b/manage.py
index 9b191a6..fddbd9f 100755
--- a/manage.py
+++ b/manage.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
import sys