summaryrefslogtreecommitdiffstats
path: root/src/pkg/debian/rules.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/debian/rules.in')
-rwxr-xr-xsrc/pkg/debian/rules.in13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/pkg/debian/rules.in b/src/pkg/debian/rules.in
index ceef46a297a..f09db38e2a1 100755
--- a/src/pkg/debian/rules.in
+++ b/src/pkg/debian/rules.in
@@ -9,18 +9,23 @@ include /usr/share/dpkg/default.mk
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