From 494d758aa60e3567f5abf17df9868c67aa70ce00 Mon Sep 17 00:00:00 2001 From: Roman Lacko Date: Mon, 5 Aug 2013 12:39:07 +0200 Subject: Properly initialize Windows SDK environment via SetEnv.cmd. Prefer Visual C++ environment script if exists (vcvars32/64.bat) --- setup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 54609f210..b16e971f0 100644 --- a/setup.py +++ b/setup.py @@ -287,7 +287,11 @@ class pyside_build(_build): def run(self): platform_arch = platform.architecture()[0] log.info("Python architecture is %s" % platform_arch) - + + build_type = OPTION_DEBUG and "Debug" or "Release" + if OPTION_RELWITHDEBINFO: + build_type = 'RelWithDebInfo' + # Check env make_path = None make_generator = None @@ -299,7 +303,7 @@ class pyside_build(_build): nmake_path = find_executable("nmake") if nmake_path is None or not os.path.exists(nmake_path): log.info("nmake not found. Trying to initialize the MSVC env...") - init_msvc_env(platform_arch, log) + init_msvc_env(platform_arch, build_type, log) else: log.info("nmake was found in %s" % nmake_path) if OPTION_JOM: @@ -331,9 +335,6 @@ class pyside_build(_build): " Please specify the path to qmake with --qmake parameter.") # Prepare parameters - build_type = OPTION_DEBUG and "Debug" or "Release" - if OPTION_RELWITHDEBINFO: - build_type = 'RelWithDebInfo' py_executable = sys.executable py_version = "%s.%s" % (sys.version_info[0], sys.version_info[1]) py_include_dir = get_config_var("INCLUDEPY") -- cgit v1.2.3