Blob Blame History Raw
--- ./Makefile.orig	2017-07-03 06:15:11.000000000 +0100
+++ ./Makefile	2017-08-18 20:15:59.975264399 +0100
@@ -38,8 +38,7 @@ PERL := perl
 PERL_VENDORLIB := $(shell $(PERL) -MConfig -e 'print $$Config{vendorlib}')
 
 # This would probably be easier if we used setup.py ...
-PYTHON2_SUPPORTED := $(shell pyversions -s)
-PYTHON_SITEDIR = $(prefix)/usr/lib/$(1)/$(if $(filter 2.0 2.1 2.2 2.3 2.4 2.5,$(patsubst python%,%,$(1))),site-packages,dist-packages)
+PYTHON_SITEDIR = $(shell python -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")
 
 # Install all else.
 install-rest:
@@ -59,10 +58,8 @@ install-rest:
 	# Install modules.
 	find Debconf -type f -name '*.pm' |grep -v CVS | \
 		xargs -i install -m 0644 {} $(prefix)/$(PERL_VENDORLIB)/{}
-	set -e; for dir in $(foreach python,$(PYTHON2_SUPPORTED),$(call PYTHON_SITEDIR,$(python))); do \
-		install -d $$dir; \
-		install -m 0644 debconf.py $$dir/; \
-	done
+	install -d $(prefix)$(PYTHON_SITEDIR)
+	install -m 0644 debconf.py $(prefix)$(PYTHON_SITEDIR)
 	install -d $(prefix)/usr/lib/python3/dist-packages
 	install -m 0644 debconf.py $(prefix)/usr/lib/python3/dist-packages/
 	# Special case for back-compatability.