update ci to fix macos builds (#2079)

update dmgbuild settings file
This commit is contained in:
pajlada 2020-10-17 16:24:02 +02:00 committed by GitHub
parent 55b98f93db
commit 48a3506d77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import biplist
import sys
import os.path
# Before Python 3.4, use biplist; afterwards, use plistlib
if sys.version_info < (3, 4):
import biplist
def read_plist(path):
return biplist.readPlist(path)
else:
import plistlib
def read_plist(path):
with open(path, 'rb') as f:
return plistlib.load(f)
#
# Example settings file for dmgbuild
#
@ -22,7 +33,7 @@ appname = os.path.basename(application)
def icon_from_app(app_path):
plist_path = os.path.join(app_path, 'Contents', 'Info.plist')
plist = biplist.readPlist(plist_path)
plist = read_plist(plist_path)
icon_name = plist['CFBundleIconFile']
icon_root,icon_ext = os.path.splitext(icon_name)
if not icon_ext: