install.py

changeset 565
21191e634b47
parent 564
b3d966393ba9
child 615
c8dd16cc69ce
equal deleted inserted replaced
564:b3d966393ba9 565:21191e634b47
28 apisDir = None 28 apisDir = None
29 doCleanup = True 29 doCleanup = True
30 doCompile = True 30 doCompile = True
31 cfg = {} 31 cfg = {}
32 progLanguages = ["Python", "Ruby"] 32 progLanguages = ["Python", "Ruby"]
33
34 # Define blacklisted versions of the prerequisites
35 BlackLists = {
36 "sip" : ["4.11"],
37 "PyQt4" : ["4.7.5"],
38 "QScintilla2" : [],
39 }
33 40
34 def exit(rcode = 0): 41 def exit(rcode = 0):
35 """ 42 """
36 Exit the install script. 43 Exit the install script.
37 """ 44 """
573 if qtMajor < 4 or (qtMajor == 4 and qtMinor < 5): 580 if qtMajor < 4 or (qtMajor == 4 and qtMinor < 5):
574 print('Sorry, you must have Qt version 4.5.0 or higher.') 581 print('Sorry, you must have Qt version 4.5.0 or higher.')
575 exit(2) 582 exit(2)
576 print("Qt Version: {0}".format(qVersion())) 583 print("Qt Version: {0}".format(qVersion()))
577 584
578 #check version of PyQt 585 # check version of sip
586 try:
587 import sipconfig
588 sipVersion = sipconfig.Configuration().sip_version_str
589 # always assume, that snapshots are new enough
590 if "snapshot" not in sipVersion:
591 # check for blacklisted versions
592 for vers in BlackLists["sip"]:
593 if vers == sipVersion:
594 print('Sorry, sip version {0} is not compatible with eric5.'\
595 .format(vers))
596 print('Please install another version.')
597 exit(3)
598 except ImportError:
599 pass
600
601 # check version of PyQt
579 from PyQt4.QtCore import PYQT_VERSION_STR 602 from PyQt4.QtCore import PYQT_VERSION_STR
580 pyqtVersion = PYQT_VERSION_STR 603 pyqtVersion = PYQT_VERSION_STR
581 # always assume, that snapshots are new enough 604 # always assume, that snapshots are new enough
582 if "snapshot" not in pyqtVersion: 605 if "snapshot" not in pyqtVersion:
583 while pyqtVersion.count('.') < 2: 606 while pyqtVersion.count('.') < 2:
587 min = int(min) 610 min = int(min)
588 pat = int(pat) 611 pat = int(pat)
589 if maj < 4 or (maj == 4 and min < 7): 612 if maj < 4 or (maj == 4 and min < 7):
590 print('Sorry, you must have PyQt 4.7.0 or higher or' \ 613 print('Sorry, you must have PyQt 4.7.0 or higher or' \
591 ' a recent snapshot release.') 614 ' a recent snapshot release.')
592 exit(3) 615 exit(4)
616 # check for blacklisted versions
617 for vers in BlackLists["PyQt4"]:
618 if vers == pyqtVersion:
619 print('Sorry, PyQt4 version {0} is not compatible with eric5.'\
620 .format(vers))
621 print('Please install another version.')
622 exit(4)
593 print("PyQt Version: ", pyqtVersion) 623 print("PyQt Version: ", pyqtVersion)
594 624
595 #check version of QScintilla 625 # check version of QScintilla
596 from PyQt4.Qsci import QSCINTILLA_VERSION_STR 626 from PyQt4.Qsci import QSCINTILLA_VERSION_STR
597 scintillaVersion = QSCINTILLA_VERSION_STR 627 scintillaVersion = QSCINTILLA_VERSION_STR
598 # always assume, that snapshots are new enough 628 # always assume, that snapshots are new enough
599 if "snapshot" not in scintillaVersion: 629 if "snapshot" not in scintillaVersion:
600 while scintillaVersion.count('.') < 2: 630 while scintillaVersion.count('.') < 2:
604 min = int(min) 634 min = int(min)
605 pat = int(pat) 635 pat = int(pat)
606 if maj < 2 or (maj == 2 and min < 4): 636 if maj < 2 or (maj == 2 and min < 4):
607 print('Sorry, you must have QScintilla 2.4.0 or higher or' \ 637 print('Sorry, you must have QScintilla 2.4.0 or higher or' \
608 ' a recent snapshot release.') 638 ' a recent snapshot release.')
609 exit(4) 639 exit(5)
640 # check for blacklisted versions
641 for vers in BlackLists["QScintilla2"]:
642 if vers == scintillaVersion:
643 print('Sorry, QScintilla2 version {0} is not compatible with eric5.'\
644 .format(vers))
645 print('Please install another version.')
646 exit(5)
610 print("QScintilla Version: ", QSCINTILLA_VERSION_STR) 647 print("QScintilla Version: ", QSCINTILLA_VERSION_STR)
611 print("All dependencies ok.") 648 print("All dependencies ok.")
612 print() 649 print()
613 650
614 def compileUiFiles(): 651 def compileUiFiles():

eric ide

mercurial