Skip to content

Commit 58ccba1

Browse files
committed
Initial patch update for v3.8.0.
Includes updating to OpenSSL 1.1.1d.
1 parent 2310d87 commit 58ccba1

File tree

4 files changed

+473
-469
lines changed

4 files changed

+473
-469
lines changed

Makefile

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
# Current director
2626
PROJECT_DIR=$(shell pwd)
2727

28-
BUILD_NUMBER=2
28+
BUILD_NUMBER=1
2929

3030
MACOSX_DEPLOYMENT_TARGET=10.8
3131

3232
# Version of packages that will be compiled by this meta-package
33-
PYTHON_VERSION=3.7.5
33+
PYTHON_VERSION=3.8.0
3434
PYTHON_VER=$(basename $(PYTHON_VERSION))
3535

36-
OPENSSL_VERSION_NUMBER=1.0.2
37-
OPENSSL_REVISION=t
36+
OPENSSL_VERSION_NUMBER=1.1.1
37+
OPENSSL_REVISION=d
3838
OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
3939

4040
BZIP2_VERSION=1.0.8
@@ -50,7 +50,7 @@ CFLAGS-macOS=-mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
5050

5151
# iOS targets
5252
TARGETS-iOS=iphonesimulator.x86_64 iphoneos.arm64
53-
CFLAGS-iOS=-mios-version-min=7.0
53+
CFLAGS-iOS=-mios-version-min=8.0
5454
CFLAGS-iphoneos.arm64=-fembed-bitcode
5555

5656
# tvOS targets
@@ -145,7 +145,7 @@ downloads/xz-$(XZ_VERSION).tgz:
145145
clean-Python:
146146
rm -rf \
147147
build/*/Python-$(PYTHON_VERSION)-* \
148-
build/*/libpython$(PYTHON_VER)m.a \
148+
build/*/libpython$(PYTHON_VER).a \
149149
build/*/pyconfig-*.h \
150150
build/*/Python
151151

@@ -155,7 +155,7 @@ downloads/Python-$(PYTHON_VERSION).tgz:
155155
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
156156

157157
PYTHON_DIR-macOS=build/macOS/Python-$(PYTHON_VERSION)-macosx.x86_64
158-
PYTHON_HOST=$(PYTHON_DIR-macOS)/dist/lib/libpython$(PYTHON_VER)m.a
158+
PYTHON_HOST=$(PYTHON_DIR-macOS)/dist/lib/libpython$(PYTHON_VER).a
159159

160160
# Build for specified target (from $(TARGETS))
161161
#
@@ -205,8 +205,9 @@ ifeq ($$(findstring simulator,$$(SDK-$1)),)
205205
sed -ie "s!static volatile sig_atomic_t intr_signal;!static volatile intr_signal;!" $$(OPENSSL_DIR-$1)/crypto/ui/ui_openssl.c
206206
endif
207207
ifeq ($$(findstring iphone,$$(SDK-$1)),)
208-
# Patch apps/speed.c to not use fork() since it's not available on tvOS
208+
# Patch apps/speed.c and apps/ocsp.c to not use fork() since it's not available on tvOS
209209
sed -ie 's/define HAVE_FORK 1/define HAVE_FORK 0/' $$(OPENSSL_DIR-$1)/apps/speed.c
210+
sed -ie 's/define HAVE_FORK 1/define HAVE_FORK 0/' $$(OPENSSL_DIR-$1)/apps/ocsp.c
210211
# Patch Configure to build for tvOS or watchOS, not iOS
211212
LC_ALL=C sed -ie 's/-D_REENTRANT:iOS/-D_REENTRANT:$2/' $$(OPENSSL_DIR-$1)/Configure
212213
endif
@@ -215,13 +216,13 @@ endif
215216
ifeq ($2,macOS)
216217
cd $$(OPENSSL_DIR-$1) && \
217218
CC="$$(CC-$1)" MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET) \
218-
./Configure darwin64-x86_64-cc --openssldir=$(PROJECT_DIR)/build/$2/openssl
219+
./Configure darwin64-x86_64-cc no-tests --prefix=$(PROJECT_DIR)/build/$2/openssl --openssldir=$(PROJECT_DIR)/build/$2/openssl
219220
else
220221
cd $$(OPENSSL_DIR-$1) && \
221222
CC="$$(CC-$1)" \
222223
CROSS_TOP="$$(dir $$(SDK_ROOT-$1)).." \
223224
CROSS_SDK="$$(notdir $$(SDK_ROOT-$1))" \
224-
./Configure iphoneos-cross no-asm --openssldir=$(PROJECT_DIR)/build/$2/openssl
225+
./Configure iphoneos-cross no-asm no-tests --prefix=$(PROJECT_DIR)/build/$2/openssl --openssldir=$(PROJECT_DIR)/build/$2/openssl
225226
endif
226227

227228
# Build OpenSSL
@@ -297,11 +298,11 @@ else
297298
endif
298299

299300
# Build Python
300-
$$(PYTHON_DIR-$1)/dist/lib/libpython$(PYTHON_VER)m.a: build/$2/Support/OpenSSL build/$2/Support/BZip2 build/$2/Support/XZ $$(PYTHON_DIR-$1)/Makefile
301+
$$(PYTHON_DIR-$1)/dist/lib/libpython$(PYTHON_VER).a: build/$2/Support/OpenSSL build/$2/Support/BZip2 build/$2/Support/XZ $$(PYTHON_DIR-$1)/Makefile
301302
# Build target Python
302303
cd $$(PYTHON_DIR-$1) && PATH="$(PROJECT_DIR)/$(PYTHON_DIR-macOS)/dist/bin:$(PATH)" make all install
303304

304-
build/$2/$$(pyconfig.h-$1): $$(PYTHON_DIR-$1)/dist/include/python$(PYTHON_VER)m/pyconfig.h
305+
build/$2/$$(pyconfig.h-$1): $$(PYTHON_DIR-$1)/dist/include/python$(PYTHON_VER)/pyconfig.h
305306
cp -f $$^ $$@
306307

307308
# Dump vars (for test)
@@ -412,28 +413,28 @@ $1: Python-$1
412413
Python-$1: dist/Python-$(PYTHON_VER)-$1-support.b$(BUILD_NUMBER).tar.gz
413414

414415
# Build Python
415-
$$(PYTHON_FRAMEWORK-$1): build/$1/libpython$(PYTHON_VER)m.a $$(foreach target,$$(TARGETS-$1),build/$1/$$(pyconfig.h-$$(target)))
416-
mkdir -p $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)m
416+
$$(PYTHON_FRAMEWORK-$1): build/$1/libpython$(PYTHON_VER).a $$(foreach target,$$(TARGETS-$1),build/$1/$$(pyconfig.h-$$(target)))
417+
mkdir -p $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)
417418

418419
# Copy the headers. The headers are the same for every platform, except for pyconfig.h
419420
# We ship a master pyconfig.h for iOS, tvOS and watchOS that delegates to architecture
420421
# specific versions; on macOS, we can use the original version as-is.
421-
cp -f -r $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/dist/include/python$(PYTHON_VER)m $$(PYTHON_FRAMEWORK-$1)/Headers
422+
cp -f -r $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/dist/include/python$(PYTHON_VER) $$(PYTHON_FRAMEWORK-$1)/Headers
422423
cp -f $$(filter %.h,$$^) $$(PYTHON_FRAMEWORK-$1)/Headers
423424
ifeq ($1,macOS)
424425
mv $$(PYTHON_FRAMEWORK-$1)/Headers/pyconfig-x86_64.h $$(PYTHON_FRAMEWORK-$1)/Headers/pyconfig.h
425426
else
426427
cp -f $(PROJECT_DIR)/patch/Python/pyconfig-$1.h $$(PYTHON_FRAMEWORK-$1)/Headers/pyconfig.h
427428
endif
428429
# Copy Python.h and pyconfig.h into the resources include directory
429-
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Headers/pyconfig*.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)m
430-
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Headers/Python.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)m
430+
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Headers/pyconfig*.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)
431+
cp -f -r $$(PYTHON_FRAMEWORK-$1)/Headers/Python.h $$(PYTHON_RESOURCES-$1)/include/python$(PYTHON_VER)
431432

432433
# Copy the standard library from the simulator build
433434
ifneq ($(TEST),)
434435
cp -f -r $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/dist/lib $$(PYTHON_RESOURCES-$1)
435436
# Remove the pieces of the resources directory that aren't needed:
436-
rm -f $$(PYTHON_RESOURCES-$1)/lib/libpython$(PYTHON_VER)m.a
437+
rm -f $$(PYTHON_RESOURCES-$1)/lib/libpython$(PYTHON_VER).a
437438
rm -rf $$(PYTHON_RESOURCES-$1)/lib/pkgconfig
438439
else
439440
mkdir -p $$(PYTHON_RESOURCES-$1)/lib
@@ -446,7 +447,7 @@ endif
446447

447448

448449
# Build libpython fat library
449-
build/$1/libpython$(PYTHON_VER)m.a: $$(foreach target,$$(TARGETS-$1),$$(PYTHON_DIR-$$(target))/dist/lib/libpython$(PYTHON_VER)m.a)
450+
build/$1/libpython$(PYTHON_VER).a: $$(foreach target,$$(TARGETS-$1),$$(PYTHON_DIR-$$(target))/dist/lib/libpython$(PYTHON_VER).a)
450451
# Create a fat binary for the libPython library
451452
mkdir -p build/$1
452453
xcrun lipo -create -output $$@ $$^

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Python Apple Support
22
====================
33

4-
**This repository branch builds a packaged version of Python 3.7.5**.
4+
**This repository branch builds a packaged version of Python 3.8.0**.
55
Other Python versions are available by cloning other branches of the main
66
repository.
77

@@ -72,7 +72,7 @@ For details on how to add these binary packages to your project, see the
7272
package-specific documentation linked above.
7373

7474

75-
.. _for macOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.7/macOS/Python-3.7-macOS-support.b2.tar.gz
76-
.. _for iOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.7/iOS/Python-3.7-iOS-support.b2.tar.gz
77-
.. _for tvOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.7/tvOS/Python-3.7-tvOS-support.b2.tar.gz
78-
.. _for watchOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.7/watchOS/Python-3.7-watchOS-support.b2.tar.gz
75+
.. _for macOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.8/macOS/Python-3.8-macOS-support.b1.tar.gz
76+
.. _for iOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.8/iOS/Python-3.8-iOS-support.b1.tar.gz
77+
.. _for tvOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.8/tvOS/Python-3.8-tvOS-support.b1.tar.gz
78+
.. _for watchOS: https://briefcase-support.s3-us-west-2.amazonaws.com/python/3.8/watchOS/Python-3.8-watchOS-support.b1.tar.gz

0 commit comments

Comments
 (0)