From 13bf8a20b0971522f050286ee67a7efb29faa2bf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 29 Apr 2021 08:50:02 +0530 Subject: [PATCH] Build universal binaries of all deps on macOS --- bypy/macos.conf | 4 +++- bypy/macos/__main__.py | 6 +----- bypy/sources.json | 27 ++++++++++++++------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/bypy/macos.conf b/bypy/macos.conf index b82c51156..9791b08b7 100644 --- a/bypy/macos.conf +++ b/bypy/macos.conf @@ -1,6 +1,8 @@ # Requires installation of XCode 10.3 and Python 3 and # python3 -m pip install certifi -vm_name 'macos-kitty-build' +vm_name 'macos-kitty' root '/Users/Shared/kitty-build' python '/usr/local/bin/python3' +universal 'true' +deploy_target '10.14' diff --git a/bypy/macos/__main__.py b/bypy/macos/__main__.py index 2599f2b21..38939a0f4 100644 --- a/bypy/macos/__main__.py +++ b/bypy/macos/__main__.py @@ -278,7 +278,6 @@ class Freeze(object): 'lcms2.2', 'crypto.1.1', 'ssl.1.1', - 'ffi.7', ): print('\nAdding', x) x = 'lib%s.dylib' % x @@ -420,7 +419,7 @@ class Freeze(object): py_compile(join(self.resources_dir, 'Python')) @flush - def makedmg(self, d, volname, internet_enable=True, format='ULFO'): + def makedmg(self, d, volname, format='ULFO'): ''' Copy a directory d into a dmg named volname ''' print('\nMaking dmg...') sys.stdout.flush() @@ -456,9 +455,6 @@ class Freeze(object): print('\nCreating dmg...') with timeit() as times: subprocess.check_call(cmd + [dmg]) - if internet_enable: - subprocess.check_call( - ['/usr/bin/hdiutil', 'internet-enable', '-yes', dmg]) print('dmg created in %d minutes and %d seconds' % tuple(times)) shutil.rmtree(tdir) size = os.stat(dmg).st_size / (1024 * 1024.) diff --git a/bypy/sources.json b/bypy/sources.json index f9bca499c..19fe284f1 100644 --- a/bypy/sources.json +++ b/bypy/sources.json @@ -28,6 +28,16 @@ } }, + { + "name": "cmake", + "os": "macos", + "unix": { + "filename": "cmake-3.19.4.tar.gz", + "hash": "sha256:7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1", + "urls": ["https://cmake.org/files/v3.19/{filename}"] + } + }, + { "name": "expat", @@ -72,6 +82,7 @@ { "name": "libffi", + "os": "linux", "unix": { "filename": "libffi-3.3.0.tar.gz", "hash": "sha256:72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056", @@ -130,9 +141,9 @@ { "name": "python", "unix": { - "filename": "Python-3.9.1.tar.xz", - "hash": "sha256:991c3f8ac97992f3d308fefeb03a64db462574eadbff34ce8bc5bb583d9903ff", - "urls": ["https://www.python.org/ftp/python/3.9.1/{filename}"] + "filename": "Python-3.9.4.tar.xz", + "hash": "sha256:4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134", + "urls": ["https://www.python.org/ftp/python/3.9.4/{filename}"] } }, @@ -154,16 +165,6 @@ } }, - { - "name": "cmake", - "os": "macos", - "unix": { - "filename": "cmake-3.19.4.tar.gz", - "hash": "sha256:7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1", - "urls": ["https://cmake.org/files/v3.19/{filename}"] - } - }, - { "name": "libpng", "unix": {