Skip to content

Commit f00ede7

Browse files
committed
Fixed SyntaxWarning: invalid escape sequence '\.' and suppress a deprecation warning
1 parent a983603 commit f00ede7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

macbuild/build4mac_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def GetKLayoutVersionFrom( verfile='version.h' ):
499499
except Exception as e:
500500
return version
501501

502-
verReg = re.compile( u'(KLAYOUT_VERSION=\")([0-9A-Z_a-z\.]+)(\")' )
502+
verReg = re.compile( r'(KLAYOUT_VERSION=\")([0-9A-Z_a-z\.]+)(\")' )
503503
for line in contents:
504504
m = verReg.match(line)
505505
if m:

macbuild/makeDMG4mac.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def CheckPkgDirectory():
279279
# * LW-qt6MP.pkg.macos-Sonoma-release-Rmp33Pmp312
280280
#-----------------------------------------------------------------------------------------------
281281
# 0 1 2 3 4 5 6 7
282-
patQRP = u'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-])(release|debug)([-])([0-9A-Za-z]+)'
282+
patQRP = r'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-])(release|debug)([-])([0-9A-Za-z]+)'
283283
regQRP = re.compile(patQRP)
284284
if not regQRP.match(PkgDir):
285285
print( "! Cannot identify (Qt, Ruby, Python) from the package directory name" )
@@ -721,7 +721,9 @@ def MakeTargetDMGFile(msg=""):
721721
# The folder will open on mount.
722722
#--------------------------------------------------------
723723
print( ">>> (10) Setting volume bootability and startup disk options..." )
724-
command = "bless --folder %s --openfolder %s" % (MountDir, MountDir)
724+
#command = "bless --folder %s --openfolder %s" % (MountDir, MountDir)
725+
#bless: The 'openfolder' option is deprecated
726+
command = "bless --folder %s" % MountDir
725727
os.system(command)
726728
sleep(2)
727729

0 commit comments

Comments
 (0)