Build universal binaries of all deps on macOS

This commit is contained in:
Kovid Goyal 2021-04-29 08:50:02 +05:30
parent 6b9b478492
commit 13bf8a20b0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 18 additions and 19 deletions

View File

@ -1,6 +1,8 @@
# Requires installation of XCode 10.3 and Python 3 and # Requires installation of XCode 10.3 and Python 3 and
# python3 -m pip install certifi # python3 -m pip install certifi
vm_name 'macos-kitty-build' vm_name 'macos-kitty'
root '/Users/Shared/kitty-build' root '/Users/Shared/kitty-build'
python '/usr/local/bin/python3' python '/usr/local/bin/python3'
universal 'true'
deploy_target '10.14'

View File

@ -278,7 +278,6 @@ class Freeze(object):
'lcms2.2', 'lcms2.2',
'crypto.1.1', 'crypto.1.1',
'ssl.1.1', 'ssl.1.1',
'ffi.7',
): ):
print('\nAdding', x) print('\nAdding', x)
x = 'lib%s.dylib' % x x = 'lib%s.dylib' % x
@ -420,7 +419,7 @@ class Freeze(object):
py_compile(join(self.resources_dir, 'Python')) py_compile(join(self.resources_dir, 'Python'))
@flush @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 ''' ''' Copy a directory d into a dmg named volname '''
print('\nMaking dmg...') print('\nMaking dmg...')
sys.stdout.flush() sys.stdout.flush()
@ -456,9 +455,6 @@ class Freeze(object):
print('\nCreating dmg...') print('\nCreating dmg...')
with timeit() as times: with timeit() as times:
subprocess.check_call(cmd + [dmg]) 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)) print('dmg created in %d minutes and %d seconds' % tuple(times))
shutil.rmtree(tdir) shutil.rmtree(tdir)
size = os.stat(dmg).st_size / (1024 * 1024.) size = os.stat(dmg).st_size / (1024 * 1024.)

View File

@ -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", "name": "expat",
@ -72,6 +82,7 @@
{ {
"name": "libffi", "name": "libffi",
"os": "linux",
"unix": { "unix": {
"filename": "libffi-3.3.0.tar.gz", "filename": "libffi-3.3.0.tar.gz",
"hash": "sha256:72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056", "hash": "sha256:72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056",
@ -130,9 +141,9 @@
{ {
"name": "python", "name": "python",
"unix": { "unix": {
"filename": "Python-3.9.1.tar.xz", "filename": "Python-3.9.4.tar.xz",
"hash": "sha256:991c3f8ac97992f3d308fefeb03a64db462574eadbff34ce8bc5bb583d9903ff", "hash": "sha256:4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134",
"urls": ["https://www.python.org/ftp/python/3.9.1/{filename}"] "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", "name": "libpng",
"unix": { "unix": {