Skip to content

Commit 6f22dbb

Browse files
committed
Updated patch for Python 3.6.3
1 parent 21ba9bb commit 6f22dbb

File tree

9 files changed

+77554
-22254
lines changed

9 files changed

+77554
-22254
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build/*
66
downloads/*
77
diff/*
88
dist/*
9+
.env

Makefile

Lines changed: 77 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,30 @@ PROJECT_DIR=$(shell pwd)
2727

2828
BUILD_NUMBER=1
2929

30+
MACOSX_DEPLOYMENT_TARGET=10.8
31+
3032
# Version of packages that will be compiled by this meta-package
31-
PYTHON_VERSION=3.6.0
33+
PYTHON_VERSION=3.6.3
3234
PYTHON_VER=$(basename $(PYTHON_VERSION))
3335

3436
OPENSSL_VERSION_NUMBER=1.0.2
35-
OPENSSL_REVISION=k
37+
OPENSSL_REVISION=m
3638
OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
3739

3840
BZIP2_VERSION=1.0.6
3941

40-
XZ_VERSION=5.2.2
42+
XZ_VERSION=5.2.3
4143

4244
# Supported OS
4345
OS=macOS iOS tvOS watchOS
4446

4547
# macOS targets
4648
TARGETS-macOS=macosx.x86_64
49+
CFLAGS-macOS=-mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
4750

4851
# iOS targets
4952
TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.i386 iphoneos.armv7 iphoneos.armv7s iphoneos.arm64
50-
CFLAGS-iOS=-miphoneos-version-min=7.0
53+
CFLAGS-iOS=-mios-version-min=7.0
5154
CFLAGS-iphoneos.armv7=-fembed-bitcode
5255
CFLAGS-iphoneos.armv7s=-fembed-bitcode
5356
CFLAGS-iphoneos.arm64=-fembed-bitcode
@@ -60,7 +63,7 @@ PYTHON_CONFIGURE-tvOS=ac_cv_func_sigaltstack=no
6063

6164
# watchOS targets
6265
TARGETS-watchOS=watchsimulator.i386 watchos.armv7k
63-
CFLAGS-watchOS=-mwatchos-version-min=2.0
66+
CFLAGS-watchOS=-mwatchos-version-min=4.0
6467
CFLAGS-watchos.armv7k=-fembed-bitcode
6568
PYTHON_CONFIGURE-watchOS=ac_cv_func_sigaltstack=no
6669

@@ -80,6 +83,15 @@ distclean: clean
8083

8184
downloads: downloads/openssl-$(OPENSSL_VERSION).tgz downloads/bzip2-$(BZIP2_VERSION).tgz downloads/xz-$(XZ_VERSION).tgz downloads/Python-$(PYTHON_VERSION).tgz
8285

86+
update-patch:
87+
# Generate a diff from the clone of the python/cpython Github repository
88+
# Requireds patchutils (installable via `brew install patchutils`)
89+
if [ -z "$(PYTHON_REPO_DIR)" ]; then echo "\n\nPYTHON_REPO_DIR must be set to the root of your Python github checkout\n\n"; fi
90+
cd $(PYTHON_REPO_DIR) && git diff -D v$(PYTHON_VERSION) $(PYTHON_VER) | filterdiff -X $(PROJECT_DIR)/patch/Python/diff-exclude.lst -p 1 --clean > $(PROJECT_DIR)/patch/Python/Python.patch
91+
92+
upload: $(foreach os,$(OS),$(os))
93+
python tools/upload.py b$(BUILD_NUMBER)
94+
8395
###########################################################################
8496
# OpenSSL
8597
# These build instructions adapted from the scripts developed by
@@ -108,7 +120,7 @@ clean-bzip2:
108120
rm -rf build/*/bzip2-$(BZIP2_VERSION)-* \
109121
build/*/bzip2
110122

111-
# Download original OpenSSL source code archive.
123+
# Download original BZip2 source code archive.
112124
downloads/bzip2-$(BZIP2_VERSION).tgz:
113125
mkdir -p downloads
114126
if [ ! -e downloads/bzip2-$(BZIP2_VERSION).tgz ]; then curl --fail -L http://www.bzip.org/$(BZIP2_VERSION)/bzip2-$(BZIP2_VERSION).tar.gz -o downloads/bzip2-$(BZIP2_VERSION).tgz; fi
@@ -122,7 +134,7 @@ clean-xz:
122134
rm -rf build/*/xz-$(XZ_VERSION)-* \
123135
build/*/xz
124136

125-
# Download original OpenSSL source code archive.
137+
# Download original XZ source code archive.
126138
downloads/xz-$(XZ_VERSION).tgz:
127139
mkdir -p downloads
128140
if [ ! -e downloads/xz-$(XZ_VERSION).tgz ]; then curl --fail -L http://tukaani.org/xz/xz-$(XZ_VERSION).tar.gz -o downloads/xz-$(XZ_VERSION).tgz; fi
@@ -135,7 +147,7 @@ downloads/xz-$(XZ_VERSION).tgz:
135147
clean-Python:
136148
rm -rf \
137149
build/*/Python-$(PYTHON_VERSION)-* \
138-
build/*/libpython$(PYTHON_VER).a \
150+
build/*/libpython$(PYTHON_VER)m.a \
139151
build/*/pyconfig-*.h \
140152
build/*/Python.framework
141153

@@ -145,7 +157,7 @@ downloads/Python-$(PYTHON_VERSION).tgz:
145157
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
146158

147159
PYTHON_DIR-macOS=build/macOS/Python-$(PYTHON_VERSION)-macosx.x86_64
148-
PYTHON_HOST=$(PYTHON_DIR-macOS)/dist/lib/libpython$(PYTHON_VER).a
160+
PYTHON_HOST=$(PYTHON_DIR-macOS)/dist/lib/libpython$(PYTHON_VER)m.a
149161

150162
# Build for specified target (from $(TARGETS))
151163
#
@@ -167,8 +179,10 @@ endif
167179
SDK-$1=$$(basename $1)
168180

169181
SDK_ROOT-$1=$$(shell xcrun --sdk $$(SDK-$1) --show-sdk-path)
170-
CC-$1=xcrun --sdk $$(SDK-$1) clang\
171-
-arch $$(ARCH-$1) --sysroot=$$(SDK_ROOT-$1) $$(CFLAGS-$2) $$(CFLAGS-$1)
182+
CC-$1=xcrun --sdk $$(SDK-$1) clang \
183+
-arch $$(ARCH-$1) \
184+
--sysroot=$$(SDK_ROOT-$1) \
185+
$$(CFLAGS-$2) $$(CFLAGS-$1)
172186
LDFLAGS-$1=-arch $$(ARCH-$1) -isysroot=$$(SDK_ROOT-$1)
173187

174188
OPENSSL_DIR-$1=build/$2/openssl-$(OPENSSL_VERSION)-$1
@@ -196,14 +210,14 @@ endif
196210
# Configure the build
197211
ifeq ($2,macOS)
198212
cd $$(OPENSSL_DIR-$1) && \
199-
CC="$$(CC-$1)" \
200-
./Configure darwin64-x86_64-cc --openssldir=$(PROJECT_DIR)/$$(OPENSSL_DIR-$1)
213+
CC="$$(CC-$1)" MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET) \
214+
./Configure darwin64-x86_64-cc --openssldir=$(PROJECT_DIR)/build/$2/openssl
201215
else
202216
cd $$(OPENSSL_DIR-$1) && \
203217
CC="$$(CC-$1)" \
204218
CROSS_TOP="$$(dir $$(SDK_ROOT-$1)).." \
205219
CROSS_SDK="$$(notdir $$(SDK_ROOT-$1))" \
206-
./Configure iphoneos-cross no-asm --openssldir=$(PROJECT_DIR)/$$(OPENSSL_DIR-$1)
220+
./Configure iphoneos-cross no-asm --openssldir=$(PROJECT_DIR)/build/$2/openssl
207221
endif
208222

209223
# Build OpenSSL
@@ -235,7 +249,7 @@ $$(XZ_DIR-$1)/Makefile: downloads/xz-$(XZ_VERSION).tgz
235249
mkdir -p $$(XZ_DIR-$1)
236250
tar zxf downloads/xz-$(XZ_VERSION).tgz --strip-components 1 -C $$(XZ_DIR-$1)
237251
# Configure the build
238-
cd $$(XZ_DIR-$1) && ./configure \
252+
cd $$(XZ_DIR-$1) && MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET) ./configure \
239253
CC="$$(CC-$1)" \
240254
LDFLAGS="$$(LDFLAGS-$1)" \
241255
--disable-shared --enable-static \
@@ -253,32 +267,33 @@ $$(PYTHON_DIR-$1)/Makefile: downloads/Python-$(PYTHON_VERSION).tgz $(PYTHON_HOST
253267
tar zxf downloads/Python-$(PYTHON_VERSION).tgz --strip-components 1 -C $$(PYTHON_DIR-$1)
254268
# Apply target Python patches
255269
cd $$(PYTHON_DIR-$1) && patch -p1 < $(PROJECT_DIR)/patch/Python/Python.patch
270+
cp -f $(PROJECT_DIR)/patch/Python/Setup.embedded $$(PYTHON_DIR-$1)/Modules/Setup.embedded
256271

257272
# Configure target Python
258273
ifeq ($2,macOS)
259-
cd $$(PYTHON_DIR-$1) && ./configure \
260-
CC="$$(CC-$1)" LD="$$(CC-$1)" \
274+
# Make a fully embedded macOS build
275+
cat $$(PYTHON_DIR-$1)/Modules/Setup.embedded $(PROJECT_DIR)/patch/Python/Setup.macOS-x86_64 > $$(PYTHON_DIR-$1)/Modules/Setup.local
276+
cd $$(PYTHON_DIR-$1) && MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET) ./configure \
261277
--prefix=$(PROJECT_DIR)/$$(PYTHON_DIR-$1)/dist \
262-
--without-pymalloc --without-doc-strings --disable-ipv6 --without-ensurepip \
278+
--without-doc-strings --without-ensurepip \
263279
$$(PYTHON_CONFIGURE-$2)
264280
else
265-
cp -f $(PROJECT_DIR)/patch/Python/Setup.embedded $$(PYTHON_DIR-$1)/Modules/Setup.embedded
266-
cd $$(PYTHON_DIR-$1) && PATH=$(PROJECT_DIR)/$(PYTHON_DIR-macOS)/python/bin:$(PATH) ./configure \
281+
cd $$(PYTHON_DIR-$1) && PATH=$(PROJECT_DIR)/build/macOS/python/bin:$(PATH) ./configure \
267282
CC="$$(CC-$1)" LD="$$(CC-$1)" \
268283
--host=$$(MACHINE_DETAILED-$1)-apple-$(shell echo $2 | tr '[:upper:]' '[:lower:]') \
269284
--build=x86_64-apple-darwin$(shell uname -r) \
270285
--prefix=$(PROJECT_DIR)/$$(PYTHON_DIR-$1)/dist \
271-
--without-pymalloc --without-doc-strings --disable-ipv6 --without-ensurepip \
286+
--without-doc-strings --disable-ipv6 --without-ensurepip \
272287
ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no \
273288
$$(PYTHON_CONFIGURE-$2)
274289
endif
275290

276291
# Build Python
277-
$$(PYTHON_DIR-$1)/dist/lib/libpython$(PYTHON_VER).a: build/$2/OpenSSL.framework build/$2/BZip2.framework build/$2/XZ.framework $$(PYTHON_DIR-$1)/Makefile
292+
$$(PYTHON_DIR-$1)/dist/lib/libpython$(PYTHON_VER)m.a: build/$2/OpenSSL.framework build/$2/BZip2.framework build/$2/XZ.framework $$(PYTHON_DIR-$1)/Makefile
278293
# Build target Python
279294
cd $$(PYTHON_DIR-$1) && PATH=$(PROJECT_DIR)/$(PYTHON_DIR-macOS)/dist/bin:$(PATH) make all install
280295

281-
build/$2/$$(pyconfig.h-$1): $$(PYTHON_DIR-$1)/dist/include/python$(PYTHON_VER)/pyconfig.h
296+
build/$2/$$(pyconfig.h-$1): $$(PYTHON_DIR-$1)/dist/include/python$(PYTHON_VER)m/pyconfig.h
282297
cp -f $$^ $$@
283298

284299
# Dump vars (for test)
@@ -332,7 +347,7 @@ OpenSSL.framework-$1: $$(OPENSSL_FRAMEWORK-$1)
332347

333348
$$(OPENSSL_FRAMEWORK-$1): build/$1/libssl.a build/$1/libcrypto.a
334349
# Create framework directory structure
335-
mkdir -p $$(OPENSSL_FRAMEWORK-$1)/Versions/$(OPENSSL_VERSION)
350+
mkdir -p $$(OPENSSL_FRAMEWORK-$1)/Versions/$(OPENSSL_VERSION)/Resources
336351

337352
# Copy the headers
338353
cp -f -r $$(OPENSSL_DIR-$$(firstword $$(TARGETS-$1)))/include $$(OPENSSL_FRAMEWORK-$1)/Versions/$(OPENSSL_VERSION)/Headers
@@ -344,8 +359,16 @@ $$(OPENSSL_FRAMEWORK-$1): build/$1/libssl.a build/$1/libcrypto.a
344359
# Create symlinks
345360
ln -fs $(OPENSSL_VERSION) $$(OPENSSL_FRAMEWORK-$1)/Versions/Current
346361
ln -fs Versions/Current/Headers $$(OPENSSL_FRAMEWORK-$1)
362+
ln -fs Versions/Current/Resources $$(OPENSSL_FRAMEWORK-$1)
347363
ln -fs Versions/Current/OpenSSL $$(OPENSSL_FRAMEWORK-$1)
348364

365+
# Create plist file
366+
sed -e "s/xxxNAMExxx/OpenSSL/g" $(PROJECT_DIR)/patch/Info.plist.tmpl > $$(OPENSSL_FRAMEWORK-$1)/Resources/Info.plist.1
367+
sed -e "s/xxxBUNDLExxx/org.openssl/g" $$(OPENSSL_FRAMEWORK-$1)/Resources/Info.plist.1 > $$(OPENSSL_FRAMEWORK-$1)/Resources/Info.plist.2
368+
sed -e "s/xxxVERSIONxxx/$$(OPENSSL_VERSION)/g" $$(OPENSSL_FRAMEWORK-$1)/Resources/Info.plist.2 > $$(OPENSSL_FRAMEWORK-$1)/Resources/Info.plist
369+
rm $$(OPENSSL_FRAMEWORK-$1)/Resources/Info.plist.1 $$(OPENSSL_FRAMEWORK-$1)/Resources/Info.plist.2
370+
371+
349372
build/$1/libssl.a: $$(foreach target,$$(TARGETS-$1),$$(OPENSSL_DIR-$$(target))/libssl.a)
350373
mkdir -p build/$1
351374
xcrun lipo -create -output $$@ $$^
@@ -359,7 +382,7 @@ BZip2.framework-$1: $$(BZIP2_FRAMEWORK-$1)
359382

360383
$$(BZIP2_FRAMEWORK-$1): build/$1/bzip2/lib/libbz2.a
361384
# Create framework directory structure
362-
mkdir -p $$(BZIP2_FRAMEWORK-$1)/Versions/$(BZIP2_VERSION)
385+
mkdir -p $$(BZIP2_FRAMEWORK-$1)/Versions/$(BZIP2_VERSION)/Resources
363386

364387
# Copy the headers
365388
cp -f -r build/$1/bzip2/include $$(BZIP2_FRAMEWORK-$1)/Versions/$(BZIP2_VERSION)/Headers
@@ -371,8 +394,16 @@ $$(BZIP2_FRAMEWORK-$1): build/$1/bzip2/lib/libbz2.a
371394
# Create symlinks
372395
ln -fs $(BZIP2_VERSION) $$(BZIP2_FRAMEWORK-$1)/Versions/Current
373396
ln -fs Versions/Current/Headers $$(BZIP2_FRAMEWORK-$1)
397+
ln -fs Versions/Current/Resources $$(BZIP2_FRAMEWORK-$1)
374398
ln -fs Versions/Current/bzip2 $$(BZIP2_FRAMEWORK-$1)
375399

400+
# Create plist file
401+
sed -e "s/xxxNAMExxx/BZip2/g" $(PROJECT_DIR)/patch/Info.plist.tmpl > $$(BZIP2_FRAMEWORK-$1)/Resources/Info.plist.1
402+
sed -e "s/xxxBUNDLExxx/org.bzip.bzip2/g" $$(BZIP2_FRAMEWORK-$1)/Resources/Info.plist.1 > $$(BZIP2_FRAMEWORK-$1)/Resources/Info.plist.2
403+
sed -e "s/xxxVERSIONxxx/$$(BZIP2_VERSION)/g" $$(BZIP2_FRAMEWORK-$1)/Resources/Info.plist.2 > $$(BZIP2_FRAMEWORK-$1)/Resources/Info.plist
404+
rm $$(BZIP2_FRAMEWORK-$1)/Resources/Info.plist.1 $$(BZIP2_FRAMEWORK-$1)/Resources/Info.plist.2
405+
406+
376407
build/$1/bzip2/lib/libbz2.a: $$(foreach target,$$(TARGETS-$1),$$(BZIP2_DIR-$$(target))/libbz2.a)
377408
mkdir -p build/$1
378409
xcrun lipo -create -o $$@ $$^
@@ -382,7 +413,7 @@ XZ.framework-$1: $$(XZ_FRAMEWORK-$1)
382413

383414
$$(XZ_FRAMEWORK-$1): build/$1/xz/lib/liblzma.a
384415
# Create framework directory structure
385-
mkdir -p $$(XZ_FRAMEWORK-$1)/Versions/$(XZ_VERSION)
416+
mkdir -p $$(XZ_FRAMEWORK-$1)/Versions/$(XZ_VERSION)/Resources
386417

387418
# Copy the headers
388419
cp -f -r build/$1/xz/include $$(XZ_FRAMEWORK-$1)/Versions/$(XZ_VERSION)/Headers
@@ -394,8 +425,15 @@ $$(XZ_FRAMEWORK-$1): build/$1/xz/lib/liblzma.a
394425
# Create symlinks
395426
ln -fs $(XZ_VERSION) $$(XZ_FRAMEWORK-$1)/Versions/Current
396427
ln -fs Versions/Current/Headers $$(XZ_FRAMEWORK-$1)
428+
ln -fs Versions/Current/Resources $$(XZ_FRAMEWORK-$1)
397429
ln -fs Versions/Current/xz $$(XZ_FRAMEWORK-$1)
398430

431+
# Create plist file
432+
sed -e "s/xxxNAMExxx/XZ/g" $(PROJECT_DIR)/patch/Info.plist.tmpl > $$(XZ_FRAMEWORK-$1)/Resources/Info.plist.1
433+
sed -e "s/xxxBUNDLExxx/org.tukaani.xz/g" $$(XZ_FRAMEWORK-$1)/Resources/Info.plist.1 > $$(XZ_FRAMEWORK-$1)/Resources/Info.plist.2
434+
sed -e "s/xxxVERSIONxxx/$$(XZ_VERSION)/g" $$(XZ_FRAMEWORK-$1)/Resources/Info.plist.2 > $$(XZ_FRAMEWORK-$1)/Resources/Info.plist
435+
rm $$(XZ_FRAMEWORK-$1)/Resources/Info.plist.1 $$(XZ_FRAMEWORK-$1)/Resources/Info.plist.2
436+
399437
build/$1/xz/lib/liblzma.a: $$(foreach target,$$(TARGETS-$1),$$(XZ_DIR-$$(target))/src/liblzma/.libs/liblzma.a)
400438
mkdir -p build/$1
401439
xcrun lipo -create -o $$@ $$^
@@ -405,23 +443,23 @@ $1: Python.framework-$1
405443
Python.framework-$1: $$(PYTHON_FRAMEWORK-$1)
406444

407445
# Build Python.framework
408-
$$(PYTHON_FRAMEWORK-$1): build/$1/libpython$(PYTHON_VER).a $$(foreach target,$$(TARGETS-$1),build/$1/$$(pyconfig.h-$$(target)))
409-
mkdir -p $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)
446+
$$(PYTHON_FRAMEWORK-$1): build/$1/libpython$(PYTHON_VER)m.a $$(foreach target,$$(TARGETS-$1),build/$1/$$(pyconfig.h-$$(target)))
447+
mkdir -p $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)m
410448

411449
# Copy the headers. The headers are the same for every platform, except for pyconfig.h
412-
cp -f -r $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/dist/include/python$(PYTHON_VER) $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers
450+
cp -f -r $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/dist/include/python$(PYTHON_VER)m $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers
413451
cp -f $$(filter %.h,$$^) $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers
414452
cp -f $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/iOS/include/pyconfig.h $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers
415453

416454
# Copy Python.h and pyconfig.h into the resources include directory
417-
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers/pyconfig*.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)
418-
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers/Python.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)
455+
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers/pyconfig*.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)m
456+
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Headers/Python.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)m
419457

420458
# Copy the standard library from the simulator build
421459
ifneq ($(TEST),)
422460
cp -f -r $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/dist/lib $$(PYTHON_RESOURCES-$1)
423461
# Remove the pieces of the resources directory that aren't needed:
424-
rm -f $$(PYTHON_RESOURCES-$1)/lib/libpython$(PYTHON_VER).a
462+
rm -f $$(PYTHON_RESOURCES-$1)/lib/libpython$(PYTHON_VER)m.a
425463
rm -rf $$(PYTHON_RESOURCES-$1)/lib/pkgconfig
426464
else
427465
mkdir -p $$(PYTHON_RESOURCES-$1)/lib
@@ -438,8 +476,14 @@ endif
438476
ln -fs Versions/Current/Resources $$(PYTHON_FRAMEWORK-$1)
439477
ln -fs Versions/Current/Python $$(PYTHON_FRAMEWORK-$1)
440478

479+
# Create plist file
480+
sed -e "s/xxxNAMExxx/Python/g" $(PROJECT_DIR)/patch/Info.plist.tmpl > $$(PYTHON_RESOURCES-$1)/Info.plist.1
481+
sed -e "s/xxxBUNDLExxx/org.python/g" $$(PYTHON_RESOURCES-$1)/Info.plist.1 > $$(PYTHON_RESOURCES-$1)/Info.plist.2
482+
sed -e "s/xxxVERSIONxxx/$$(PYTHON_VERSION)/g" $$(PYTHON_RESOURCES-$1)/Info.plist.2 > $$(PYTHON_RESOURCES-$1)/Info.plist
483+
rm $$(PYTHON_RESOURCES-$1)/Info.plist.1 $$(PYTHON_RESOURCES-$1)/Info.plist.2
484+
441485
# Build libpython fat library
442-
build/$1/libpython$(PYTHON_VER).a: $$(foreach target,$$(TARGETS-$1),$$(PYTHON_DIR-$$(target))/dist/lib/libpython$(PYTHON_VER).a)
486+
build/$1/libpython$(PYTHON_VER)m.a: $$(foreach target,$$(TARGETS-$1),$$(PYTHON_DIR-$$(target))/dist/lib/libpython$(PYTHON_VER)m.a)
443487
# Create a fat binary for the libPython library
444488
mkdir -p build/$1
445489
xcrun lipo -create -output $$@ $$^

README.rst

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,13 @@ The binaries support the ``$(ARCHS_STANDARD)`` set - that is, x86_64 for
1515
macOS, armv7 and arm64 for iOS devices, arm64 for appleTV devices, and armv7k
1616
for watchOS. This should enable the code to run on:
1717

18-
* MacBook (including Pro & Air)
18+
* MacBook
1919
* iMac
2020
* Mac Pro
21-
* iPhone
22-
- iPhone 4s
23-
- iPhone 5
24-
- iPhone 5c
25-
- iPhone 5s
26-
- iPhone 6
27-
- iPhone 6 Plus
28-
- iPhone 6s
29-
- iPhone 6s Plus
30-
- iPhone 7
31-
* iPad Pro
21+
* iPhone (4s or later)
3222
* iPad
33-
- iPad 2
34-
- iPad (3rd gen)
35-
- iPad (4th gen)
36-
- iPad Air
37-
- iPad Air 2
38-
- iPad retina
39-
* iPad Mini
40-
- iPad Mini (1st gen)
41-
- iPad Mini 2
42-
- iPad Mini 3
43-
- iPad Mini 4
44-
* iPod Touch
45-
- iPod Touch (4th gen)
46-
- iPod Touch (5th gen)
47-
- iPod Touch (6th gen)
48-
* Apple TV
49-
- 4th gen
23+
* iPod Touch (4th gen or later)
24+
* Apple TV (4th gen or later)
5025
* Apple Watch
5126

5227
Quickstart
@@ -73,10 +48,10 @@ This should:
7348
The build products will be in the `build` directory; the compiled frameworks
7449
will be in the `dist` directory.
7550

76-
.. _for macOS: https://github.com/pybee/Python-Apple-support/releases/download/3.6-b1/Python-3.6-macOS-support.b1.tar.gz
77-
.. _for iOS: https://github.com/pybee/Python-Apple-support/releases/download/3.6-b1/Python-3.6-iOS-support.b1.tar.gz
78-
.. _for tvOS: https://github.com/pybee/Python-Apple-support/releases/download/3.6-b1/Python-3.6-tvOS-support.b1.tar.gz
79-
.. _for watchOS: https://github.com/pybee/Python-Apple-support/releases/download/3.6-b1/Python-3.6-watchOS-support.b1.tar.gz
51+
.. _for macOS: https://s3-us-west-2.amazonaws.com/pybee-briefcase-support/Python-Apple-support/3.6/macOS/Python-3.6-macOS-support.b2.tar.gz
52+
.. _for iOS: https://s3-us-west-2.amazonaws.com/pybee-briefcase-support/Python-Apple-support/3.6/iOS/Python-3.6-macOS-support.b2.tar.gz
53+
.. _for tvOS: https://s3-us-west-2.amazonaws.com/pybee-briefcase-support/Python-Apple-support/3.6/tvOS/Python-3.6-macOS-support.b2.tar.gz
54+
.. _for watchOS: https://s3-us-west-2.amazonaws.com/pybee-briefcase-support/Python-Apple-support/3.6/watchOS/Python-3.6-macOS-support.b2.tar.gz
8055

8156
Acknowledgements
8257
----------------

patch/Info.plist.tmpl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleExecutable</key>
8+
<string>xxxNAMExxx</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>xxxBUNDLExxx</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundlePackageType</key>
14+
<string>FMWK</string>
15+
<key>CFBundleSignature</key>
16+
<string>????</string>
17+
<key>CFBundleVersion</key>
18+
<string>xxxVERSIONxxx</string>
19+
</dict>
20+
</plist>

0 commit comments

Comments
 (0)