diff --git a/debian/compat b/debian/compat
index ec635144f60048986bc560c5576355344005e6e7..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index c27a7673075d5d0a3071329f26d64a638e4b5cf5..8034f1218c964434d5e5351d758bc6920b8798a6 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,9 @@ Section: net
 Priority: extra
 Maintainer: Autistici/Inventati <debian@autistici.org>
 Build-Depends: debhelper (>= 10), apache2-dev | apache2-prefork-dev | apache2-threaded-dev,
- apache2, autoconf, automake, libtool, python-dev, dh-python, python-all,
- libpam-dev, libssl-dev, python-setuptools, python-flup, pkg-config, libz-dev,
- python-m2crypto, python-flask, python-nose, python-mox, python-beautifulsoup
+ apache2, autoconf, automake, libtool, python3-dev, dh-python, python3-all,
+ libpam-dev, libssl-dev, python3-setuptools, python3-flup, pkg-config, libz-dev,
+ python3-m2crypto, python3-flask, python3-nose, python3-mox, python3-bs4
 Standards-Version: 3.7.2
 
 Package: ai-sso
diff --git a/debian/rules b/debian/rules
index ce37677bfdd763473e45a44cbe90c50fb97d0a87..f606ef66890f1788e36aea4eccfc0210f15b8555 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@
 
 override_dh_auto_configure:
 	sh autogen.sh
-	./configure --prefix=/usr --with-pam-dir=/lib/security --enable-pam-sso --enable-mod-sso --enable-shared
+	./configure --prefix=/usr --with-pam-dir=/lib/security --enable-pam-sso --enable-mod-sso --enable-shared PYTHON_VERSION=3
 
 override_dh_auto_install:
 	install -d $(CURDIR)/debian/tmp/etc/sso