Patchwork D7217: packaging: allow choosing python version depending on centos version

login
register
mail settings
Submitter phabricator
Date Nov. 4, 2019, 9:53 p.m.
Message ID <610f820850618b60ef71464343930241@localhost.localdomain>
Download mbox | patch
Permalink /patch/42732/
State Not Applicable
Headers show

Comments

phabricator - Nov. 4, 2019, 9:53 p.m.
Closed by commit rHGa69772d2f3c3: packaging: allow choosing python version depending on centos version (authored by Mathias De Mare &lt;mathias.de_mare@nokia.com&gt;).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7217?vs=17516&id=17538

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7217/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7217

AFFECTED FILES
  contrib/packaging/Makefile

CHANGE DETAILS




To: Mathiasdm, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/packaging/Makefile b/contrib/packaging/Makefile
--- a/contrib/packaging/Makefile
+++ b/contrib/packaging/Makefile
@@ -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