packaging: allow choosing python version depending on centos version stable
authorMathias De Mare <mathias.de_mare@nokia.com>
Mon, 04 Nov 2019 07:40:32 +0100
branchstable
changeset 43404 a69772d2f3c3
parent 43403 90fba2248693
child 43405 7c9d42c1042d
packaging: allow choosing python version depending on centos version Differential Revision: https://phab.mercurial-scm.org/D7217
contrib/packaging/Makefile
--- a/contrib/packaging/Makefile	Mon Nov 04 19:05:44 2019 +0000
+++ b/contrib/packaging/Makefile	Mon Nov 04 07:40:32 2019 +0100
@@ -20,6 +20,7 @@
 
 # Build a Python for these CentOS releases.
 CENTOS_WITH_PYTHON_RELEASES := 5 6
+CENTOS_WITH_NONVERSIONED_PYTHON := 5 6 7
 
 help:
 	@echo 'Packaging Make Targets'
@@ -110,13 +111,13 @@
 .PHONY: centos$(1)
 centos$(1):
 	mkdir -p $$(HGROOT)/packages/centos$(1)
-	./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,--python python)
+	./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
 	cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1)
 	cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1)
 
 .PHONY: docker-centos$(1)
 docker-centos$(1):
-	./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,--python python)
+	./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
 
 endef