diff options
author | Roman Lacko <backup.rlacko@gmail.com> | 2013-07-25 01:02:15 +0200 |
---|---|---|
committer | Roman Lacko <backup.rlacko@gmail.com> | 2013-07-25 01:02:15 +0200 |
commit | 248628862b7a394cfd02cd0489be2becefc9e12e (patch) | |
tree | 138b48b0e796a99d965e085aabd7731f17947839 | |
parent | 4758131240a3fc70c89ceaa7eb8489b7b85bfdc4 (diff) |
Set default VC++ compiler version by python interpreter version. For python=3.3 use VC 2010. For python<= 3.2 use VC 2008.
-rw-r--r-- | README.rst | 8 | ||||
-rw-r--r-- | setup.py | 11 |
2 files changed, 9 insertions, 10 deletions
diff --git a/README.rst b/README.rst index c752cbdc4..ee055505d 100644 --- a/README.rst +++ b/README.rst @@ -121,12 +121,6 @@ Building PySide distribution c:\> c:\Python27\python.exe setup.py bdist_wininst --version=1.2.0 --qmake=c:\Qt\4.8.4\bin\qmake.exe --openssl=c:\OpenSSL32bit\bin -#. Optionally you can specify the msvc compiler version: - - :: - - c:\> c:\Python27\python.exe setup.py bdist_wininst --msvc-version=10.0 --version=1.2.0 --qmake=c:\Qt\4.8.4\bin\qmake.exe --openssl=c:\OpenSSL32bit\bin - #. To build the development version of ``PySide`` windows installer, ignore the --version parameter: :: @@ -286,7 +280,7 @@ Options ``--msvc-version`` Specify the Visual C++ compiler version. - Supported values are ``9.0`` (for VS 2008), ``10.0`` (for VS 2010), ``11.0`` (for VS 2012). + Supported values are ``9.0`` (for VS 2008), ``10.0`` (for VS 2010). ``--standalone`` When enabled, all required Qt libs will be included in PySide distribution. @@ -119,12 +119,17 @@ if sys.platform == "win32": if not OPTION_MAKESPEC in ["msvc", "mingw"]: print("Invalid option --make-spec. Available values are %s" % (["msvc", "mingw"])) sys.exit(1) - if OPTION_MSVCVERSION: + if not OPTION_MSVCVERSION: + if sys.version_info[:2] < (3,3): + OPTION_MSVCVERSION = "9.0" + else: + OPTION_MSVCVERSION = "10.0" + else: if OPTION_MAKESPEC != "msvc": print("Option --msvc-version can be used only with option --make-spec=msvc") sys.exit(1) - if not OPTION_MSVCVERSION in ["9.0", "10.0", "11.0"]: - print("Invalid option --msvc-version. Available values are %s" % (["9.0", "10.0", "11.0"])) + if not OPTION_MSVCVERSION in ["9.0", "10.0"]: + print("Invalid option --msvc-version. Available values are %s" % (["9.0", "10.0"])) sys.exit(1) else: if OPTION_MAKESPEC is None: |