aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRoman Lacko <backup.rlacko@gmail.com>2013-08-05 12:39:07 +0200
committerRoman Lacko <backup.rlacko@gmail.com>2013-08-05 12:39:07 +0200
commit494d758aa60e3567f5abf17df9868c67aa70ce00 (patch)
tree7cd3fa31c0cdfd6767671f47828c8e50a9c8d53e /setup.py
parentd6b786cebc4c452653e3d23f7957bfc21ecf6d06 (diff)
Properly initialize Windows SDK environment via SetEnv.cmd. Prefer Visual C++ environment script if exists (vcvars32/64.bat)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py11
1 files changed, 6 insertions, 5 deletions
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")