debian: switch to Python 3 (#36233)

This commit is contained in:
Frédéric Péters 2019-09-29 15:09:42 +02:00
parent 848f36482d
commit baf081c2c2
14 changed files with 49 additions and 45 deletions

5
debian/combo-manage vendored
View File

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

59
debian/control vendored
View File

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

View File

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

8
debian/py3dist-overrides vendored Normal file
View File

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

View File

@ -1 +0,0 @@
django_ckeditor python-django-ckeditor

View File

@ -1 +0,0 @@
usr/lib/python2*/*-packages

View File

@ -1 +0,0 @@
rm_conffile /etc/cron.hourly/python-combo 1.3-1 python-combo

1
debian/python3-combo.install vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/python3.*

5
debian/rules vendored
View File

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

3
debian/settings.py vendored
View File

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

2
debian/uwsgi.ini vendored
View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import sys