Skip to content

Commit 354fcd1

Browse files
committed
Add Makefile support for building pre-releases.
1 parent cd9f865 commit 354fcd1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ BUILD_NUMBER=custom
3333
MACOSX_DEPLOYMENT_TARGET=10.8
3434

3535
# Version of packages that will be compiled by this meta-package
36+
# PYTHON_VERSION is the full version number (e.g., 3.10.0b3)
37+
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
38+
# PYTHON_VER is the major/minor version (e.g., 3.10)
3639
PYTHON_VERSION=3.9.4
40+
PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+")
3741
PYTHON_VER=$(basename $(PYTHON_VERSION))
3842

3943
OPENSSL_VERSION_NUMBER=1.1.1
40-
OPENSSL_REVISION=i
44+
OPENSSL_REVISION=j
4145
OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
4246

4347
BZIP2_VERSION=1.0.8
@@ -175,7 +179,7 @@ clean-Python:
175179
# Download original Python source code archive.
176180
downloads/Python-$(PYTHON_VERSION).tgz:
177181
mkdir -p downloads
178-
if [ ! -e downloads/Python-$(PYTHON_VERSION).tgz ]; then curl -L https://www.python.org/ftp/python/$(PYTHON_VERSION)/Python-$(PYTHON_VERSION).tgz > downloads/Python-$(PYTHON_VERSION).tgz; fi
182+
if [ ! -e downloads/Python-$(PYTHON_VERSION).tgz ]; then curl -L https://www.python.org/ftp/python/$(PYTHON_MICRO_VERSION)/Python-$(PYTHON_VERSION).tgz > downloads/Python-$(PYTHON_VERSION).tgz; fi
179183

180184
# Some Python targets needed to identify the host build
181185
PYTHON_DIR-macOS=build/macOS/Python-$(PYTHON_VERSION)-macOS

0 commit comments

Comments
 (0)