Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Builder|qmake: Run Python 2 specifically
Python 3 is becoming commonplace as the default version, but our scripts are still using Python 2. These changes ensure that Python 2 (2.7) is run whenever Python is needed. On Windows, however, it is up to the user to make sure that Python 2 is the default Python (on the PATH).
- Loading branch information
Showing
15 changed files
with
115 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python2.7 | ||
# Determining the number of a build. | ||
|
||
import time | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python2.7 | ||
# coding=utf-8 | ||
# | ||
# Repository Codex Generator by <jaakko.keranen@iki.fi> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python2.7 | ||
|
||
import os, sys | ||
import conhelp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python2.7 | ||
|
||
import sys, os.path, struct | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python2.7 | ||
# | ||
# Doomsday Build Configuration Script | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# The Doomsday Engine Project | ||
# Copyright (c) 2011-2014 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
# Copyright (c) 2011-2013 Daniel Swanson <danij@dengine.net> | ||
|
||
defineTest(runPython2) { | ||
win32: system(python $$1) # 2.7 still expected | ||
else: system(python2.7 $$1) | ||
} | ||
|
||
defineTest(runPython2InDir) { | ||
win32: system(cd "$$1" && python $$2) | ||
else: system(cd "$$1" && python2.7 $$2) | ||
} | ||
|
||
defineTest(echo) { | ||
deng_verbosebuildconfig { | ||
!win32 { | ||
message($$1) | ||
} else { | ||
# We don't want to get the printed messages after everything else, | ||
# so print to stdout. | ||
system(echo $$1) | ||
} | ||
} | ||
} | ||
|
||
defineTest(useLibDir) { | ||
btype = "" | ||
win32 { | ||
deng_debug: btype = "/Debug" | ||
else: btype = "/Release" | ||
} | ||
exists($${1}$${btype}) { | ||
LIBS += -L$${1}$${btype} | ||
export(LIBS) | ||
return(true) | ||
} | ||
return(false) | ||
} | ||
|
||
defineTest(doPostLink) { | ||
isEmpty(QMAKE_POST_LINK) { | ||
QMAKE_POST_LINK = $$1 | ||
} else { | ||
QMAKE_POST_LINK = $$QMAKE_POST_LINK && $$1 | ||
} | ||
export(QMAKE_POST_LINK) | ||
} | ||
|
||
macx { | ||
defineTest(removeQtLibPrefix) { | ||
doPostLink("install_name_tool -change $$[QT_INSTALL_LIBS]/$$2 $$2 $$1") | ||
} | ||
defineTest(fixInstallName) { | ||
# 1: binary file | ||
# 2: library name | ||
# 3: path to Frameworks/ | ||
removeQtLibPrefix($$1, $$2) | ||
doPostLink("install_name_tool -change $$2 @executable_path/$$3/Frameworks/$$2 $$1") | ||
} | ||
defineTest(fixPluginInstallId) { | ||
# 1: target name | ||
# 2: version | ||
doPostLink("install_name_tool -id @executable_path/../DengPlugins/$${1}.bundle/Versions/$$2/$$1 $${1}.bundle/Versions/$$2/$$1") | ||
} | ||
} |