diff --git a/debian/control b/debian/control index 13211bd..1ddee4e 100644 --- a/debian/control +++ b/debian/control @@ -2,33 +2,36 @@ Source: fargo Maintainer: Entr'ouvert Section: python Priority: optional -Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 9), dh-python, python-django, dh-systemd +Build-Depends: python3-setuptools, python3-all, python3-django, debhelper (>= 9), dh-python, dh-systemd Standards-Version: 3.9.6 -X-Python-Version: >= 2.7 -Package: python-fargo +Package: python3-fargo Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, - python-django (>= 1.8), - python-django-filters (>= 1), - python-django-filters (<< 2), - python-gadjo, - python-magic, - python-sorl-thumbnail, +Depends: ${misc:Depends}, ${python3:Depends}, + python3-django (>= 1.10), + python3-django-filters (>= 1), + python3-django-filters (<< 2), + python3-django-tables2, + python3-gadjo, + python3-magic, + python3-sorl-thumbnail, graphicsmagick-imagemagick-compat -Recommends: python-django-mellon -Description: Fargo Document Box (Python module) +Recommends: python3-django-mellon +Breaks: fargo (<<0.32.post5) +Description: Fargo Document Box (Python 3 module) Package: fargo Architecture: all Depends: ${misc:Depends}, - python-fargo (= ${binary:Version}), - python-hobo, - python-django-tenant-schemas, - python-psycopg2, - python-django-mellon, + python3-fargo (= ${binary:Version}), + python3-hobo, + python3-django-tenant-schemas, + python3-psycopg2, + python3-django-mellon, uwsgi, - uwsgi-plugin-python + uwsgi-plugin-python3 Recommends: nginx, graphicsmagick Suggests: postgresql +Breaks: python-fargo (<<0.32.post5) +Replaces: python-fargo (<<0.32.post5) Description: Fargo Document Box diff --git a/debian/debian_config.py b/debian/debian_config.py index c19d13f..acc4cab 100644 --- a/debian/debian_config.py +++ b/debian/debian_config.py @@ -1,4 +1,4 @@ -# This file is sourced by "execfile" from fargo.settings +# This file is sourced by "exec()" from fargo.settings import os @@ -7,12 +7,12 @@ PROJECT_NAME = 'fargo' # # hobotization (multitenant) # -execfile('/usr/lib/hobo/debian_config_common.py') +exec(open('/usr/lib/hobo/debian_config_common.py').read()) # # 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/fargo-manage b/debian/fargo-manage index cff0fdd..a597023 100644 --- a/debian/fargo-manage +++ b/debian/fargo-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/python-fargo.dirs b/debian/python-fargo.dirs deleted file mode 100644 index 0c9b4cf..0000000 --- a/debian/python-fargo.dirs +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/fargo diff --git a/debian/python-fargo.install b/debian/python-fargo.install deleted file mode 100644 index c0a7d2e..0000000 --- a/debian/python-fargo.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin/manage.py /usr/lib/fargo -usr/lib/python2*/*-packages diff --git a/debian/python-fargo.docs b/debian/python3-fargo.docs similarity index 100% rename from debian/python-fargo.docs rename to debian/python3-fargo.docs diff --git a/debian/rules b/debian/rules index 83aef84..c486a23 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=fargo %: - dh $@ --with python2,systemd + dh $@ --with python3,systemd --buildsystem=pybuild + +override_dh_install: + dh_install + mv $(CURDIR)/debian/python3-fargo/usr/bin/manage.py $(CURDIR)/debian/fargo/usr/lib/fargo/manage.py diff --git a/debian/uwsgi.ini b/debian/uwsgi.ini index 98e642f..2afa81e 100644 --- a/debian/uwsgi.ini +++ b/debian/uwsgi.ini @@ -2,7 +2,7 @@ auto-procname = true procname-prefix-spaced = fargo -plugin = python +plugin = python3 module = fargo.wsgi:application http-socket = /run/fargo/fargo.sock