Skip to content

Commit d9135c8

Browse files
committed
Small cleanups of the Makefile and README.
1 parent 33b2314 commit d9135c8

File tree

2 files changed

+47
-35
lines changed

2 files changed

+47
-35
lines changed

Makefile

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - iOS - build everything for iOS
66
# - tvOS - build everything for tvOS
77
# - watchOS - build everything for watchOS
8-
# - BZip2 - build Bzip2 for all platforms
8+
# - BZip2 - build BZip2 for all platforms
99
# - BZip2-macOS - build BZip2 for macOS
1010
# - BZip2-iOS - build BZip2 for iOS
1111
# - BZip2-tvOS - build BZip2 for tvOS
@@ -35,9 +35,6 @@ PROJECT_DIR=$(shell pwd)
3535

3636
BUILD_NUMBER=custom
3737

38-
# This version limit will only be honored on x86_64 builds.
39-
MACOSX_DEPLOYMENT_TARGET=10.15
40-
4138
# Version of packages that will be compiled by this meta-package
4239
# PYTHON_VERSION is the full version number (e.g., 3.10.0b3)
4340
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
@@ -46,23 +43,23 @@ PYTHON_VERSION=3.10.4
4643
PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+")
4744
PYTHON_VER=$(basename $(PYTHON_VERSION))
4845

49-
OPENSSL_VERSION_NUMBER=1.1.1
50-
OPENSSL_REVISION=o
51-
OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
52-
5346
BZIP2_VERSION=1.0.8
5447

5548
XZ_VERSION=5.2.5
5649

50+
OPENSSL_VERSION_NUMBER=1.1.1
51+
OPENSSL_REVISION=o
52+
OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
53+
5754
LIBFFI_VERSION=3.4.2
5855

59-
# Supported OS
56+
# Supported OS and products
6057
PRODUCTS=BZip2 XZ OpenSSL libFFI Python
6158
OS_LIST=macOS iOS tvOS watchOS
6259

6360
# macOS targets
6461
TARGETS-macOS=macosx.x86_64 macosx.arm64
65-
CFLAGS-macOS=-mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
62+
CFLAGS-macOS=-mmacosx-version-min=10.15
6663
CFLAGS-macosx.x86_64=
6764
CFLAGS-macosx.arm64=
6865
SLICE-macosx=macos-arm64_x86_64
@@ -106,8 +103,6 @@ MACHINE_SIMPLE-arm64=arm
106103
MACHINE_DETAILED-arm64_32=aarch64
107104
MACHINE_SIMPLE-arm64_32=arm
108105

109-
110-
111106
# The architecture of the machine doing the build
112107
HOST_ARCH=$(shell uname -m)
113108

@@ -117,7 +112,7 @@ all: $(OS_LIST)
117112
.PHONY: \
118113
all clean distclean update-patch vars \
119114
$(foreach product,$(PRODUCTS),$(foreach os,$(OS_LIST),$(product) $(product)-$(os) clean-$(product))) \
120-
$(foreach os,$(OS_LIST),$(os) vars-$(os))
115+
$(foreach os,$(OS_LIST),$(os) clean-$(os) vars-$(os))
121116

122117
# Clean all builds
123118
clean:
@@ -328,7 +323,6 @@ $$(XZ_DIR-$(target))/Makefile: downloads/xz-$(XZ_VERSION).tgz
328323
tar zxf downloads/xz-$(XZ_VERSION).tgz --strip-components 1 -C $$(XZ_DIR-$(target))
329324
# Configure the build
330325
cd $$(XZ_DIR-$(target)) && \
331-
MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET-$$(ARCH-$(target))) \
332326
./configure \
333327
CC="$$(CC-$(target))" \
334328
LDFLAGS="$$(LDFLAGS-$(target))" \
@@ -373,7 +367,6 @@ endif
373367
ifeq ($(os),macOS)
374368
cd $$(OPENSSL_DIR-$(target)) && \
375369
CC="$$(CC-$(target))" \
376-
MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET-$$(ARCH-$(target))) \
377370
./Configure darwin64-$$(ARCH-$(target))-cc no-tests \
378371
--prefix="$(PROJECT_DIR)/$$(OPENSSL_DIR-$(target))/_install" \
379372
--openssldir=/etc/ssl \
@@ -391,8 +384,8 @@ endif
391384
# The OpenSSL Makefile is... interesting. Invoking `make all` or `make
392385
# install` *modifies the Makefile*. Therefore, we can't use the Makefile as
393386
# a build dependency, because building/installing dirties the target that
394-
# was a dependency. To compensate, create a dummy file as a marker for
395-
# whether OpenSSL has been configured, and use *that* as a reference.
387+
# was used as a dependency. To compensate, create a dummy file as a marker
388+
# for whether OpenSSL has been configured, and use *that* as a reference.
396389
date > $$(OPENSSL_DIR-$(target))/is_configured
397390

398391
$$(OPENSSL_DIR-$(target))/libssl.a: $$(OPENSSL_DIR-$(target))/is_configured
@@ -536,7 +529,6 @@ vars-$(target):
536529

537530
endef # build-target
538531

539-
540532
###########################################################################
541533
# Build for specified sdk (extracted from the base names in $(TARGETS-*))
542534
###########################################################################
@@ -801,7 +793,6 @@ $$(PYTHON_DIR-$(os))/Makefile: \
801793
> $$(PYTHON_DIR-$(os))/Modules/Setup.local
802794
# Configure target Python
803795
cd $$(PYTHON_DIR-$(os)) && \
804-
MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET) \
805796
./configure \
806797
CC="$(CC-macosx)" LD="$(CC-macosx)" \
807798
--prefix="$(PROJECT_DIR)/$$(PYTHON_DIR-$(os))/_install" \
@@ -879,7 +870,10 @@ $(os): dist/Python-$(PYTHON_VER)-$(os)-support.$(BUILD_NUMBER).tar.gz
879870

880871
clean-$(os):
881872
@echo ">>> Clean $(os) build products"
882-
rm -rf build/$(os)
873+
rm -rf \
874+
build/$(os) \
875+
dist/Python-$(PYTHON_VER)-$(os)-support.$(BUILD_NUMBER).tar.gz \
876+
dist/Python-$(PYTHON_VER)-$(os)-support.test-$(BUILD_NUMBER).tar.gz \
883877

884878
###########################################################################
885879
# Build: Debug

README.rst

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,39 @@ It works by downloading, patching, and building a fat binary of Python and
1212
selected pre-requisites, and packaging them as static libraries that can be
1313
incorporated into an XCode project.
1414

15+
It exposed *almost* all the modules in the Python standard library except for:
16+
* dbm.gnu
17+
* tkinter
18+
* nis
19+
* ossaudiodev
20+
* spwd
21+
22+
The following standard library modules are available on macOS, but not the other
23+
Apple platforms:
24+
* curses
25+
* posixshmem
26+
* posixsubprocess
27+
* readline
28+
1529
The binaries support x86_64 and arm64 for macOS; arm64 for iOS and appleTV
16-
devices; and arm64_32 for watchOS. This should enable the code to run on:
17-
18-
* MacBook (including MacBooks using Apple Silicon)
19-
* iMac (including iMacs using Apple Silicon)
20-
* Mac Mini (including M1 Apple Silicon Mac minis)
21-
* Mac Pro
22-
* iPhone (6s or later)
23-
* iPad (5th gen or later)
24-
* iPad Air (all models)
25-
* iPad Mini (2 or later)
26-
* iPad Pro (all models)
27-
* iPod Touch (7th gen or later)
28-
* Apple TV (4th gen or later)
29-
* Apple Watch (4th gen or later)
30+
devices; and arm64_32 for watchOS. It also supports device simulators on both
31+
x86_64 and M1 hardware. This should enable the code to run on:
32+
33+
* macOS 10.15 (Catalina) or later, on:
34+
* MacBook (including MacBooks using Apple Silicon)
35+
* iMac (including iMacs using Apple Silicon)
36+
* Mac Mini (including M1 Apple Silicon Mac minis)
37+
* Mac Studio (all models)
38+
* Mac Pro (all models)
39+
* iOS 13.0 or later, on:
40+
* iPhone (6s or later)
41+
* iPad (5th gen or later)
42+
* iPad Air (all models)
43+
* iPad Mini (2 or later)
44+
* iPad Pro (all models)
45+
* iPod Touch (7th gen or later)
46+
* tvOS 9.0 or later, on Apple TV (4th gen or later)
47+
* watchOS 4.0 or later, on Apple Watch (4th gen or later)
3048

3149
Quickstart
3250
----------
@@ -47,7 +65,7 @@ This should:
4765

4866
1. Download the original source packages
4967
2. Patch them as required for compatibility with the selected OS
50-
3. Build the packages as XCode-compatible frameworks.
68+
3. Build the packages as XCode-compatible XCFrameworks.
5169

5270
The build products will be in the `build` directory; the compiled frameworks
5371
will be in the `dist` directory.

0 commit comments

Comments
 (0)