ishcherb / rpms / debconf

Forked from rpms/debconf 6 years ago
Clone

Blame debconf-1.5.49-python_version_support.patch

775cbf2
diff -up ./Makefile.old ./Makefile
775cbf2
--- ./Makefile.old	2013-04-03 04:54:30.830945272 +0300
775cbf2
+++ ./Makefile	2013-04-03 05:04:43.305687227 +0300
775cbf2
@@ -35,8 +35,7 @@ install-i18n:
0d42696
 	$(MAKE) -C po install
0d42696
 
0d42696
 # This would probably be easier if we used setup.py ...
0d42696
-PYTHON2_SUPPORTED := $(shell pyversions -s)
0d42696
-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)
0d42696
+PYTHON_SITEDIR = $(shell python -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")
0d42696
 
0d42696
 # Install all else.
0d42696
 install-rest:
775cbf2
@@ -56,10 +55,8 @@ install-rest:
0d42696
 	# Install modules.
0d42696
 	find Debconf -type f -name '*.pm' |grep -v CVS | \
0d42696
 		xargs -i install -m 0644 {} $(prefix)/usr/share/perl5/{}
0d42696
-	set -e; for dir in $(foreach python,$(PYTHON2_SUPPORTED),$(call PYTHON_SITEDIR,$(python))); do \
0d42696
-		install -d $$dir; \
0d42696
-		install -m 0644 debconf.py $$dir/; \
0d42696
-	done
0d42696
+	install -d $(prefix)$(PYTHON_SITEDIR)
0d42696
+	install -m 0644 debconf.py $(prefix)$(PYTHON_SITEDIR)
0d42696
 	install -d $(prefix)/usr/lib/python3/dist-packages
775cbf2
 	install -m 0644 debconf.py $(prefix)/usr/lib/python3/dist-packages/
0d42696
 	# Special case for back-compatability.