misc: fix ubuntu 20.04 python deps

Type: fix
Change-Id: I9cdfbffd6333d090f970422bf047aaa90c1e4c65
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/pkg/debian/rules.in b/src/pkg/debian/rules.in
index ceef46a..f09db38 100755
--- a/src/pkg/debian/rules.in
+++ b/src/pkg/debian/rules.in
@@ -9,18 +9,23 @@
 
 export PYBUILD_NAME = vpp-api
 export PYBUILD_DIR = @CMAKE_SOURCE_DIR@/vpp-api/python
-export PYBUILD_DESTDIR_python2=debian/vpp-api-python/
-export PYBUILD_DISABLE_python2=test
 export PYBUILD_DESTDIR_python3=debian/python3-vpp-api/
 export PYBUILD_DISABLE_python3=test
 export PYBUILD_SYSTEM=distutils
-
+ifeq (@VPP_DEB_WITH_PYTHON2@,yes)
+export PYBUILD_DESTDIR_python2=debian/vpp-api-python/
+export PYBUILD_DISABLE_python2=test
 buildvers := $(shell pyversions -sv)
+DH_WITH = systemd,python2,python3
+else
+DH_WITH = systemd,python3
+endif
+
 build3vers := $(shell py3versions -sv)
 
 # main packaging script based on dh7 syntax
 %:
-	dh $@ --with systemd,python2,python3 --buildsystem=pybuild
+	dh $@ --with $(DH_WITH) --buildsystem=pybuild
 
 override_dh_strip:
 	dh_strip --dbg-package=vpp-dbg