Commit 7b6856ad by Csók Tamás

client: added option to install 32bit pywin on 64bit system

parent d6c6602c
......@@ -9,6 +9,23 @@ import os
import sys
import subprocess
import windowsclasses
import argparse
def parse_arguments():
"""
Argument parser, based on argparse module
Keyword arguments:
@return args -- arguments given by console
"""
parser = argparse.ArgumentParser()
parser.add_argument(
"change_architect", type=str,
help="Whether the 32 bit Python version is installed on a 64bit system",
nargs='?', default=False)
args = parser.parse_args()
return args
def main():
......@@ -18,16 +35,18 @@ def main():
Job:
Install Pywin32 to the computer
"""
args = parse_arguments()
if sys.hexversion < 0x02060000:
print "Not a 2.6+ version Python is running, commencing update"
subprocess.Popen(
"%s\\no_root_install.bat" % os.path.dirname(
"%s\\install.cmd" % os.path.dirname(
os.path.realpath(__file__)))
sys.exit(1)
else:
pywin32_version = str(219)
if sys.hexversion < 0x02070000:
if windowsclasses.DecideArchitecture.Is64Windows():
if (windowsclasses.DecideArchitecture.Is64Windows()
and not args.change_architect):
subprocess.Popen(
"%s\\x64\\pywin32-%s.win-amd64-py2.6.exe" % (
os.path.dirname(os.path.realpath(__file__)),
......@@ -38,7 +57,8 @@ def main():
os.path.dirname(os.path.realpath(__file__)),
pywin32_version)).wait()
elif sys.hexversion < 0x02080000:
if windowsclasses.DecideArchitecture.Is64Windows():
if (windowsclasses.DecideArchitecture.Is64Windows()
and not args.change_architect):
subprocess.Popen(
"%s\\x64\\pywin32-%s.win-amd64-py2.7.exe" % (
os.path.dirname(os.path.realpath(__file__)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment