[Reproducible-commits] [cdbs] 04/41: Modernize python-distutils.mk installdir handling (since supported even in oldstable now): Use --install-layout=deb (and drop --prefix=/usr) by default, and use --install-lib option (not --install-purelib/--install-platlib, and only when DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL is set). Deprecate cdbs_expand_python_distutils_installdir, and have it provide .../dist-packages dir (not .../site-packages) by default to try cope with packages relying on it for non-skel use. Closes: bug#565973. Thanks to Matthias Klose and Piotr Ożarowski.

Mattia Rizzolo mattia at debian.org
Tue May 10 14:42:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch reproducible
in repository cdbs.

commit 43bb35d73d73f0aabb53733fce795169d906428b
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Sun Jan 19 22:47:38 2014 +0100

    Modernize python-distutils.mk installdir handling (since supported even in oldstable now): Use --install-layout=deb (and drop --prefix=/usr) by default, and use --install-lib option (not --install-purelib/--install-platlib, and only when DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL is set).  Deprecate cdbs_expand_python_distutils_installdir, and have it provide .../dist-packages dir (not .../site-packages) by default to try cope with packages relying on it for non-skel use. Closes: bug#565973 [...]
---
 1/class/python-distutils.mk.in | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/1/class/python-distutils.mk.in b/1/class/python-distutils.mk.in
index 5b10c7a..434018a 100644
--- a/1/class/python-distutils.mk.in
+++ b/1/class/python-distutils.mk.in
@@ -28,9 +28,9 @@ include $(_cdbs_class_path)/python-module.mk$(_cdbs_makefile_suffix)
 
 DEB_PYTHON_SETUP_CMD ?= setup.py
 DEB_PYTHON_BUILD_ARGS ?= --build-base="$(CURDIR)/$(cdbs_curbuilddir)/build"
-DEB_PYTHON_INSTALL_ARGS_ALL ?= --prefix=/usr --no-compile -O0
+DEB_PYTHON_INSTALL_ARGS_ALL ?= --no-compile -O0
 DEB_PYTHON_CLEAN_ARGS ?= -a
-#DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL = /usr/lib/@PYTHONBINARY@/site-packages/
+#DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL = /usr/lib/@PYTHONBINARY@/dist-packages/
 
 _cdbs_deprecated_vars += DEB_PYTHON_SETUP_CMD,0.4.89
 _cdbs_deprecated_DEB_PYTHON_SETUP_CMD_default := $(DEB_PYTHON_SETUP_CMD)
@@ -56,10 +56,9 @@ cdbs_python_setup_cmd = $(call cdbs_expand_curvar,DEB_PYTHON_SETUP_CMD)
 cdbs_python_build_args = $(call cdbs_expand_curvar,DEB_PYTHON_BUILD_ARGS)
 cdbs_python_install_args = $(call cdbs_expand_curvar,DEB_PYTHON_INSTALL_ARGS)
 cdbs_python_clean_args = $(call cdbs_expand_curvar,DEB_PYTHON_CLEAN_ARGS)
-cdbs_expand_python_distutils_installdir = $(strip \
-	$(subst @PYTHONBINARY@,$1,$(or $(strip \
-		$(DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL)),$(strip \
-		/usr/lib/@PYTHONBINARY@/site-packages/))))
+_cdbs_expand_python_distutils_skeldir = $(strip \
+	$(subst @PYTHONBINARY@,$1,\
+		$(DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL)))
 
 # prepare sanity checks
 cdbs_python_packages_pre := $(cdbs_python_arch_packages)$(cdbs_python_indep_packages)
@@ -134,7 +133,9 @@ $(patsubst %,install/%,$(cdbs_python_indep_packages)) :: install/%: python-insta
 		$(cdbs_curpythonindepbinary) \
 			$(cdbs_python_setup_cmd) install \
 			--root="$(cdbs_python_destdir)" \
-			--install-purelib=$(call cdbs_expand_python_distutils_installdir,$(cdbs_curpythonpribinary)) \
+			--install-layout=deb \
+			$(if $(DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL),\
+				--install-lib=$(call _cdbs_expand_python_distutils_skeldir,$(cdbs_curpythonpribinary))) \
 			$(cdbs_python_install_args)
 
 $(patsubst %,install/%,$(cdbs_python_arch_packages)) :: install/%: $(addprefix python-install-, $(cdbs_python_build_versions))
@@ -144,8 +145,9 @@ $(patsubst %,install/%,$(cdbs_python_arch_packages)) :: install/%: $(addprefix p
 			$(call cdbs_python_binary,python$(buildver)) \
 				$(cdbs_python_setup_cmd) install \
 				--root="$(cdbs_python_destdir)" \
-				--install-purelib=$(call cdbs_expand_python_distutils_installdir,python$(buildver)) \
-				--install-platlib=$(call cdbs_expand_python_distutils_installdir,python$(buildver)) \
+				--install-layout=deb \
+				$(if $(DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL),\
+					--install-lib=$(call _cdbs_expand_python_distutils_skeldir,python$(buildver))) \
 				$(cdbs_python_install_args); )
 
 # Deprecated targets.  You should use above targets instead.
@@ -187,4 +189,12 @@ clean::
 	find "$(CURDIR)" -prune -name '*.egg-info' -exec rm -rf '{}' ';'
 
 .PHONY: $(patsubst %,python-module-clean/%,$(cdbs_python_indep_packages) $(cdbs_python_arch_packages))
+
+# deprecated variables
+cdbs_expand_python_distutils_installdir = $(strip $(call cdbs_warn_deprecated,\
+	cdbs_expand_python_distutils_installdir,0.5)\
+	$(subst @PYTHONBINARY@,$1,$(or $(strip \
+		$(DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL)),$(strip \
+		/usr/lib/@PYTHONBINARY@/dist-packages/))))
+
 endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/cdbs.git



More information about the Reproducible-commits mailing list