Browse files

Check, that SCons is started with Python 2.7 32-bit and warn the user…

… if not. (#8926)

* Ensure, that SCons is started with Python 2.7 32-bit fail otherwise. Fix for #7095

* Improve readability of the displayed message.

* Review actions

* Review actions.
  • Loading branch information...
lukaszgo1 authored and michaelDCurran committed Jan 14, 2019
1 parent 2a63710 commit 5fc060b2bdc0f674a9e00d07f48c2f5663a85183
Showing with 13 additions and 0 deletions.
  1. +13 −0
@@ -3,6 +3,19 @@

import sys
import os
import platform
# Variables for storing required version of Python, and the version which is used to run this script.
requiredPythonMajor ="2"
requiredPythonMinor = "7"
requiredPythonArchitecture = "32bit"
installedPythonMajor = str(sys.version_info.major)
installedPythonMinor = str(sys.version_info.minor)
installedPythonArchitecture = platform.architecture()[0]
# Ensure, that we are running with required version of Python, otherwise inform the user and exit.
if installedPythonArchitecture != requiredPythonArchitecture or installedPythonMajor != requiredPythonMajor or installedPythonMinor != requiredPythonMinor:
print("This script is started with Python %s.%s %s, however to build NVDA you have to use Python %s.%s %s." %(installedPythonMajor, installedPythonMinor, installedPythonArchitecture, requiredPythonMajor, requiredPythonMinor, requiredPythonArchitecture))
print("Please install the needed version of Python and launch SCons again, or if you have mulltiple versions of Python installed start this script with required version explicitly.")
os.path.join(__file__, "..", "source")))
import sourceEnv

0 comments on commit 5fc060b

Please sign in to comment.