Skip to content

Commit

Permalink
Merge pull request GafferHQ#5121 from johnhaddon/windowsBuildPR
Browse files Browse the repository at this point in the history
Windows build fixes
  • Loading branch information
ericmehl authored Feb 3, 2023
2 parents 0c860f4 + 187a8a1 commit 2a17542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main/sconsOptions
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,4 @@ if sys.platform == "win32" :
INKSCAPE = "C:\\Program Files\\Inkscape\\inkscape.com"
WARNINGS_AS_ERRORS = False
APPLESEED_ROOT = None
CXXFLAGS = "\"-DBOOST_ALL_NO_LIB\""
SPHINX = "noSphinxYet"
6 changes: 4 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ else:
"/DNOMINMAX", # Suppress compiler definition of `min` and `max`
"/D__PRETTY_FUNCTION__=__FUNCSIG__",
"/DBOOST_ALL_DYN_LINK",
"/DBOOST_ALL_NO_LIB",
"/W4", # Warning level 4, one level less than all warnings
"/experimental:external", # Allow use of /external:I
"/external:W0", # Suppress warnings for headers included with /external:I
Expand Down Expand Up @@ -790,8 +791,9 @@ if "BOOST_MAJOR_VERSION" not in baseLibEnv :

basePythonEnv = baseLibEnv.Clone()

pythonExecutable = shutil.which( "python", path = commandEnv["ENV"]["PATH"] )
basePythonEnv["PYTHON_VERSION"] = subprocess.check_output(
[ "python", "-c", "import sys; print( '{}.{}'.format( *sys.version_info[:2] ) )" ],
[ pythonExecutable, "-c", "import sys; print( '{}.{}'.format( *sys.version_info[:2] ) )" ],
env=commandEnv["ENV"], universal_newlines=True
).strip()

Expand All @@ -800,7 +802,7 @@ if basePythonEnv["PLATFORM"] == "win32" :

basePythonEnv["PYTHON_ABI_VERSION"] = basePythonEnv["PYTHON_VERSION"]
basePythonEnv["PYTHON_ABI_VERSION"] += subprocess.check_output(
[ "python", "-c", "import sysconfig; print( sysconfig.get_config_var( 'abiflags' ) or '' )" ],
[ pythonExecutable, "-c", "import sysconfig; print( sysconfig.get_config_var( 'abiflags' ) or '' )" ],
env=commandEnv["ENV"], universal_newlines=True
).strip()

Expand Down

0 comments on commit 2a17542

Please sign in to comment.