-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate SCons build scripts to Python 3 (#1505)
* Decouple local SCons from custom MSVC tools * Remove some unused python imports * Fix encoding when writing the testsuite report * Use zip in Python 3 * Remove unused imports * Fix abuild bash script * Fix abuild bash script * Use print function instead of the Python 2 statement * Missing ported next() * Remove unused stuff and other Python 3 fixes * Update bottle to a Python 2/3 compatible version * SCons envs cannot be cloned inside actions * Do not write valgrind reports, since it is not supported * More ports of isinstance(_, basestring) * Do not write testuite report as binary data * Fix testsuite report generation * Fix testsuite report generation * More Python 3 fixes for the doxygen builder * Fix dict "iteritems" comming from the master branch
- Loading branch information
Showing
92 changed files
with
10,940 additions
and
3,864 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,10 @@ | ||
#!/bin/sh | ||
|
||
## invokes a local install of scons (forwarding all arguments) | ||
python -B tools/scons/scons.py --site-dir=tools/scons-custom "$@" | ||
SOURCE="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
|
||
SCONS_PATH=$SOURCE/tools/scons/scons.py | ||
SCONS_TOOLS=$SOURCE/tools/scons-custom | ||
SCONS="python -B $SCONS_PATH" | ||
|
||
export PYTHONPATH=$SCONS_TOOLS | ||
$SCONS --site-dir=$SCONS_TOOLS $* |
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,3 +1,9 @@ | ||
@REM invokes a local install of scons (forwarding all arguments) | ||
@SETLOCAL ENABLEEXTENSIONS | ||
@ECHO OFF | ||
|
||
@python -B tools\scons\scons.py --site-dir=tools\scons-custom %* | ||
SET SCONS_PATH="%~dp0\tools\scons\scons.py" | ||
SET SCONS_TOOLS="%~dp0\tools\scons-custom" | ||
SET SCONS=python -B %SCONS_PATH% | ||
|
||
SET PYTHONPATH=%SCONS_TOOLS% | ||
%SCONS% --site-dir=%SCONS_TOOLS% %* |
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Copyright (c) 2001 - 2019 The SCons Foundation | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining | ||
# a copy of this software and associated documentation files (the | ||
# "Software"), to deal in the Software without restriction, including | ||
# without limitation the rights to use, copy, modify, merge, publish, | ||
# distribute, sublicense, and/or sell copies of the Software, and to | ||
# permit persons to whom the Software is furnished to do so, subject to | ||
# the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included | ||
# in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | ||
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
|
||
__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan" | ||
|
||
__doc__ = """ | ||
Common functions for Microsoft Visual Studio and Visual C/C++. | ||
""" | ||
|
||
import copy | ||
import os | ||
import re | ||
import subprocess | ||
|
||
import SCons.Errors | ||
import SCons.Platform.win32 | ||
import SCons.Util | ||
|
||
from .sdk import mssdk_exists, \ | ||
mssdk_setup_env | ||
|
||
from .vc import msvc_exists, \ | ||
msvc_setup_env, \ | ||
msvc_setup_env_once, \ | ||
msvc_version_to_maj_min | ||
|
||
from .vs import get_default_version, \ | ||
get_vs_by_version, \ | ||
merge_default_version, \ | ||
msvs_exists, \ | ||
query_versions | ||
|
||
# Local Variables: | ||
# tab-width:4 | ||
# indent-tabs-mode:nil | ||
# End: | ||
# vim: set expandtab tabstop=4 shiftwidth=4: |
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,67 @@ | ||
# | ||
# Copyright (c) 2001 - 2019 The SCons Foundation | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining | ||
# a copy of this software and associated documentation files (the | ||
# "Software"), to deal in the Software without restriction, including | ||
# without limitation the rights to use, copy, modify, merge, publish, | ||
# distribute, sublicense, and/or sell copies of the Software, and to | ||
# permit persons to whom the Software is furnished to do so, subject to | ||
# the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included | ||
# in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | ||
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
|
||
__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan" | ||
|
||
__doc__ = """Module to define supported Windows chip architectures. | ||
""" | ||
|
||
import os | ||
|
||
class ArchDefinition(object): | ||
""" | ||
A class for defining architecture-specific settings and logic. | ||
""" | ||
def __init__(self, arch, synonyms=[]): | ||
self.arch = arch | ||
self.synonyms = synonyms | ||
|
||
SupportedArchitectureList = [ | ||
ArchDefinition( | ||
'x86', | ||
['i386', 'i486', 'i586', 'i686'], | ||
), | ||
|
||
ArchDefinition( | ||
'x86_64', | ||
['AMD64', 'amd64', 'em64t', 'EM64T', 'x86_64'], | ||
), | ||
|
||
ArchDefinition( | ||
'ia64', | ||
['IA64'], | ||
), | ||
|
||
ArchDefinition( | ||
'arm', | ||
['ARM'], | ||
), | ||
|
||
] | ||
|
||
SupportedArchitectureMap = {} | ||
for a in SupportedArchitectureList: | ||
SupportedArchitectureMap[a.arch] = a | ||
for s in a.synonyms: | ||
SupportedArchitectureMap[s] = a | ||
|
Oops, something went wrong.