Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGa69772d2f3c3: packaging: allow choosing python version depending on centos version
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | contrib/packaging/Makefile (5 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 4c7421a355b5 | c2c3ee8794dd | Mathias De Mare | Nov 4 2019, 1:40 AM |
| CENTOS_RELEASES := \ | CENTOS_RELEASES := \ | ||||
| 5 \ | 5 \ | ||||
| 6 \ | 6 \ | ||||
| 7 | 7 | ||||
| # Build a Python for these CentOS releases. | # Build a Python for these CentOS releases. | ||||
| CENTOS_WITH_PYTHON_RELEASES := 5 6 | CENTOS_WITH_PYTHON_RELEASES := 5 6 | ||||
| CENTOS_WITH_NONVERSIONED_PYTHON := 5 6 7 | |||||
| help: | help: | ||||
| @echo 'Packaging Make Targets' | @echo 'Packaging Make Targets' | ||||
| @echo '' | @echo '' | ||||
| @echo 'docker-centos{$(strip $(CENTOS_RELEASES))}' | @echo 'docker-centos{$(strip $(CENTOS_RELEASES))}' | ||||
| @echo ' Build an RPM for a specific CentOS version using Docker.' | @echo ' Build an RPM for a specific CentOS version using Docker.' | ||||
| @echo '' | @echo '' | ||||
| @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}' | @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}' | ||||
| docker-fedora: | docker-fedora: | ||||
| ./dockerrpm fedora$(FEDORA_RELEASE) | ./dockerrpm fedora$(FEDORA_RELEASE) | ||||
| # CentOS targets. | # CentOS targets. | ||||
| define centos_targets | define centos_targets | ||||
| .PHONY: centos$(1) | .PHONY: centos$(1) | ||||
| centos$(1): | centos$(1): | ||||
| mkdir -p $$(HGROOT)/packages/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/RPMS/*/* $$(HGROOT)/packages/centos$(1) | ||||
| cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1) | cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1) | ||||
| .PHONY: docker-centos$(1) | .PHONY: docker-centos$(1) | ||||
| 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 | endef | ||||
| $(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release)))) | $(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release)))) | ||||
| .PHONY: linux-wheels | .PHONY: linux-wheels | ||||
| linux-wheels: linux-wheels-x86_64 linux-wheels-i686 | linux-wheels: linux-wheels-x86_64 linux-wheels-i686 | ||||
| .PHONY: linux-wheels-x86_64 | .PHONY: linux-wheels-x86_64 | ||||
| linux-wheels-x86_64: | linux-wheels-x86_64: | ||||
| docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/packaging/build-linux-wheels.sh | docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/packaging/build-linux-wheels.sh | ||||
| .PHONY: linux-wheels-i686 | .PHONY: linux-wheels-i686 | ||||
| linux-wheels-i686: | linux-wheels-i686: | ||||
| docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/packaging/build-linux-wheels.sh | docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/packaging/build-linux-wheels.sh | ||||