Skip to content

Commit 68ea0fe

Browse files
committed
Differentiate the binary package version number from the source version number.
1 parent ff5adbb commit 68ea0fe

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22
on:
33
pull_request:
4+
push:
5+
branches:
6+
- main
7+
- 3.*
48

59
env:
610
FORCE_COLOR: "1"

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ BUILD_NUMBER=custom
1313

1414
# Version of packages that will be compiled by this meta-package
1515
# PYTHON_VERSION is the full version number (e.g., 3.10.0b3)
16+
# PYTHON_PKG_VERSION is the version number with binary package releases to use
17+
# for macOS binaries. This will be less than PYTHON_VERSION towards the end
18+
# of a release cycle, as official binaries won't be published.
1619
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
1720
# PYTHON_VER is the major/minor version (e.g., 3.10)
1821
PYTHON_VERSION=3.13.0rc1
22+
PYTHON_PKG_VERSION=$(PYTHON_VERSION)
1923
PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+")
24+
PYTHON_PKG_MICRO_VERSION=$(shell echo $(PYTHON_PKG_VERSION) | grep -Eo "\d+\.\d+\.\d+")
2025
PYTHON_VER=$(basename $(PYTHON_VERSION))
2126

2227
# The binary releases of dependencies, published at:
@@ -96,11 +101,11 @@ downloads/Python-$(PYTHON_VERSION).tar.gz:
96101
curl $(CURL_FLAGS) -o $@ \
97102
https://www.python.org/ftp/python/$(PYTHON_MICRO_VERSION)/Python-$(PYTHON_VERSION).tgz
98103

99-
downloads/python-$(PYTHON_VERSION)-macos11.pkg:
104+
downloads/python-$(PYTHON_PKG_VERSION)-macos11.pkg:
100105
@echo ">>> Download macOS Python package"
101106
mkdir -p downloads
102107
curl $(CURL_FLAGS) -o $@ \
103-
https://www.python.org/ftp/python/$(PYTHON_MICRO_VERSION)/python-$(PYTHON_VERSION)-macos11.pkg
108+
https://www.python.org/ftp/python/$(PYTHON_PKG_MICRO_VERSION)/python-$(PYTHON_PKG_VERSION)-macos11.pkg
104109

105110
###########################################################################
106111
# Build for specified target (from $(TARGETS-*))
@@ -522,15 +527,15 @@ ifeq ($(os),macOS)
522527
PYTHON_FRAMEWORK-$(os)=$$(PYTHON_INSTALL-$(sdk))/Python.framework
523528

524529
$$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \
525-
downloads/python-$(PYTHON_VERSION)-macos11.pkg
530+
downloads/python-$(PYTHON_PKG_VERSION)-macos11.pkg
526531
@echo ">>> Repackage macOS package as XCFramework"
527532

528533
# Unpack .pkg file. It turns out .pkg files are readable by tar... although
529534
# their internal format is a bit of a mess. From tar's perspective, the .pkg
530535
# is a tarball that contains additional tarballs; the inner tarball has the
531536
# "payload" that is the framework.
532537
mkdir -p build/macOS/macosx/python-$(PYTHON_VERSION)
533-
tar zxf downloads/python-$(PYTHON_VERSION)-macos11.pkg -C build/macOS/macosx/python-$(PYTHON_VERSION)
538+
tar zxf downloads/python-$(PYTHON_PKG_VERSION)-macos11.pkg -C build/macOS/macosx/python-$(PYTHON_VERSION)
534539

535540
# Unpack payload inside .pkg file
536541
mkdir -p $$(PYTHON_FRAMEWORK-macosx)

0 commit comments

Comments
 (0)