scripts/install.py

branch
maintenance
changeset 7737
5371a22cf2aa
parent 7642
72721823d453
parent 7723
8a33a532fbe9
child 7824
096b3ebc1409
equal deleted inserted replaced
7691:e2b36c2167b7 7737:5371a22cf2aa
788 ['*.tmpl']) 788 ['*.tmpl'])
789 copyTree( 789 copyTree(
790 os.path.join(eric6SourceDir, "CodeTemplates"), 790 os.path.join(eric6SourceDir, "CodeTemplates"),
791 cfg['ericCodeTemplatesDir'], 791 cfg['ericCodeTemplatesDir'],
792 ['*.tmpl']) 792 ['*.tmpl'])
793
794 # copy some data files needed at various places
795 copyTree(
796 os.path.join(eric6SourceDir, "E5Network", "data"),
797 os.path.join(cfg['ericDir'], "E5Network", "data"),
798 ['*.dat', '*.txt'])
799 copyTree(
800 os.path.join(eric6SourceDir, "IconEditor", "cursors"),
801 os.path.join(cfg['ericDir'], "IconEditor", "cursors"),
802 ['*.xpm'])
803 copyTree(
804 os.path.join(eric6SourceDir, "UI", "data"),
805 os.path.join(cfg['ericDir'], "UI", "data"),
806 ['*.css'])
807 copyTree(
808 os.path.join(eric6SourceDir, "WebBrowser"),
809 os.path.join(cfg['ericDir'], "WebBrowser"),
810 ['*.xbel', '*.xml', '*.html', '*.png', '*.gif', '*.js'])
793 811
794 # copy the wrappers 812 # copy the wrappers
795 for wname in wnames: 813 for wname in wnames:
796 shutilCopy(wname, cfg['bindir'], perm=0o755) 814 shutilCopy(wname, cfg['bindir'], perm=0o755)
797 os.remove(wname) 815 os.remove(wname)
1381 try: 1399 try:
1382 from PyQt5.QtCore import qVersion 1400 from PyQt5.QtCore import qVersion
1383 except ImportError as msg: 1401 except ImportError as msg:
1384 installed = pipInstall( 1402 installed = pipInstall(
1385 "PyQt5", 1403 "PyQt5",
1386 "PyQt5 could not be detected.\nError: {0}".format(msg) 1404 "'PyQt5' could not be detected.\nError: {0}".format(msg)
1387 ) 1405 )
1388 if installed: 1406 if installed:
1389 # try to import it again 1407 # try to import it again
1390 try: 1408 try:
1391 from PyQt5.QtCore import qVersion 1409 from PyQt5.QtCore import qVersion
1414 from PyQt5.QtCore import PYQT_VERSION 1432 from PyQt5.QtCore import PYQT_VERSION
1415 if PYQT_VERSION >= 0x050c00: 1433 if PYQT_VERSION >= 0x050c00:
1416 # PyQt 5.12 separated QtWebEngine into a separate wheel 1434 # PyQt 5.12 separated QtWebEngine into a separate wheel
1417 installed = pipInstall( 1435 installed = pipInstall(
1418 "PyQtWebEngine", 1436 "PyQtWebEngine",
1419 "PyQtWebEngine could not be detected.\nError: {0}" 1437 "Optional 'PyQtWebEngine' could not be detected.\nError: {0}"
1420 .format(msg) 1438 .format(msg)
1421 ) 1439 )
1422 1440
1423 try: 1441 try:
1424 from PyQt5 import QtChart # __IGNORE_WARNING__ 1442 from PyQt5 import QtChart # __IGNORE_WARNING__
1425 except ImportError as msg: 1443 except ImportError as msg:
1426 installed = pipInstall( 1444 installed = pipInstall(
1427 "PyQtChart", 1445 "PyQtChart",
1428 "PyQtChart could not be detected.\nError: {0}" 1446 "Optional 'PyQtChart' could not be detected.\nError: {0}"
1429 .format(msg) 1447 .format(msg)
1430 ) 1448 )
1431 1449
1432 try: 1450 try:
1433 from PyQt5 import Qsci # __IGNORE_WARNING__ 1451 from PyQt5 import Qsci # __IGNORE_WARNING__
1434 except ImportError as msg: 1452 except ImportError as msg:
1435 installed = pipInstall( 1453 installed = pipInstall(
1436 "QScintilla", 1454 "QScintilla",
1437 "QScintilla could not be detected.\nError: {0}".format(msg) 1455 "'QScintilla' could not be detected.\nError: {0}".format(msg)
1438 ) 1456 )
1439 if installed: 1457 if installed:
1440 # try to import it again 1458 # try to import it again
1441 try: 1459 try:
1442 from PyQt5 import Qsci # __IGNORE_WARNING__ 1460 from PyQt5 import Qsci # __IGNORE_WARNING__

eric ide

mercurial