@@ -240,7 +240,7 @@ def py_arch(self):
240
240
@property
241
241
def prepath (self ):
242
242
"""Return PATH contents to be prepend to the environment variable"""
243
- path = [r"Lib\site-packages\PyQt4" ,
243
+ path = [r"Lib\site-packages\PyQt5" , r"Lib\site-packages\ PyQt4" ,
244
244
"" , # Python root directory (python.exe)
245
245
"DLLs" , "Scripts" , r"..\tools" , r"..\tools\mingw32\bin"
246
246
]
@@ -466,6 +466,11 @@ def _install_required_packages(self):
466
466
self .install_package ('%s-([0-9\.]*[a-z]*[0-9]?)(.*)(\.exe|\.whl)' %
467
467
'setuptools' , install_options = ['--upgrade' , '--no-deps' ])
468
468
469
+ #Pyqt5 (doesn't currently install in build this way, reason unclear)
470
+ #self.install_package(
471
+ # 'PyQt5-([0-9\.\-]*)-gpl-Py%s-Qt([0-9\.\-]*)%s.exe'
472
+ # % (self.python_version, self.pyqt_arch))
473
+
469
474
# Install 'main packages' first (was before Wheel idea, keep for now)
470
475
for happy_few in ['pip' , 'wheel' , 'pywin32' , 'six' , 'numpy' , 'spyder' ,
471
476
'scipy' , 'matplotlib' , 'pandas' ]:
@@ -549,17 +554,29 @@ def _create_launchers(self):
549
554
# args='register_python',
550
555
# workdir='${WINPYDIR}\Scripts')
551
556
552
- self .create_launcher ('Qt Demo.exe' , 'qt.ico' , args = 'qtdemo.pyw' ,
553
- workdir = r'${WINPYDIR}\Lib\site-packages\PyQt4\examples\demos\qtdemo' )
554
- self .create_launcher ('Qt Assistant.exe' , 'qtassistant.ico' ,
555
- command = r'${WINPYDIR}\Lib\site-packages\PyQt4\assistant.exe' ,
556
- workdir = r'${WINPYDIR}' )
557
- self .create_launcher ('Qt Designer.exe' , 'qtdesigner.ico' ,
558
- command = r'${WINPYDIR}\Lib\site-packages\PyQt4\designer.exe' ,
559
- workdir = r'${WINPYDIR}' )
560
- self .create_launcher ('Qt Linguist.exe' , 'qtlinguist.ico' ,
561
- command = r'${WINPYDIR}\Lib\site-packages\PyQt4\linguist.exe' ,
562
- workdir = r'${WINPYDIR}' )
557
+ python_lib_dir = osp .join (self .winpydir , self .python_name ,
558
+ r"Lib\site-packages" )
559
+ # manage Qt4, Qt5
560
+ for QtV in (5 , 4 ):
561
+ PyQt = 'PyQt%s' % QtV
562
+ QtDemo_path = 'demos\qtdemo' if QtV == 4 else 'qtdemo'
563
+ if osp .isdir (osp .join (python_lib_dir , PyQt )):
564
+ self .create_launcher ('Qt%s Demo.exe' % QtV , 'qt.ico' ,
565
+ args = 'qtdemo.pyw' , workdir =
566
+ r'${WINPYDIR}\Lib\site-packages\%s\examples\%s' %
567
+ (PyQt , QtDemo_path ) )
568
+ self .create_launcher ('Qt%s Assistant.exe' % QtV ,
569
+ 'qtassistant.ico' ,
570
+ command = r'${WINPYDIR}\Lib\site-packages\%s\assistant.exe' %
571
+ PyQt , workdir = r'${WINPYDIR}' )
572
+ self .create_launcher ('Qt%s Designer.exe' % QtV ,
573
+ 'qtdesigner.ico' ,
574
+ command = r'${WINPYDIR}\Lib\site-packages\%s\designer.exe' %
575
+ PyQt , workdir = r'${WINPYDIR}' )
576
+ self .create_launcher ('Qt%s Linguist.exe' % QtV ,
577
+ 'qtlinguist.ico' ,
578
+ command = r'${WINPYDIR}\Lib\site-packages\%s\linguist.exe' %
579
+ PyQt , workdir = r'${WINPYDIR}' )
563
580
if self .python_version [0 ] == '3' :
564
581
ipython_exe = 'ipython3.exe'
565
582
ipython_scr = 'ipython3-script.py'
@@ -919,8 +936,10 @@ def _create_batch_scripts(self):
919
936
call %~dp0env.bat
920
937
call %~dp0register_python.bat --all""" )
921
938
self .create_python_batch ('wpcp.bat' , 'wpcp' , workdir = 'Scripts' )
922
- self .create_python_batch ('pyqt_demo.bat' , 'qtdemo.pyw' ,
923
- workdir = r'Lib\site-packages\PyQt4\examples\demos\qtdemo' )
939
+ self .create_python_batch ('pyqt4_demo.bat' , 'qtdemo.pyw' ,
940
+ workdir = r'Lib\site-packages\PyQt4\examples\demos\qtdemo' )
941
+ self .create_python_batch ('pyqt5_demo.bat' , 'qtdemo.pyw' ,
942
+ workdir = r'Lib\site-packages\PyQt5\examples\qtdemo' )
924
943
925
944
# pre-run wingw batch
926
945
print ('now pre-running extra mingw' )
@@ -1155,31 +1174,29 @@ def make_all(build_number, release_level, pyver,
1155
1174
# DO create only what version at a time
1156
1175
# You may have to manually delete previous build\winpython-.. directory
1157
1176
1158
- make_all (2 , '' , pyver = '3.4' , rootdir = r'D:\Winpython' ,
1159
- verbose = False , archis = (32 , ))
1160
- # make_all(2 , '', pyver='3.4', rootdir=r'D:\Winpython',
1161
- # verbose=False, archis=(64, ), flavor='')
1162
- #make_all(7 , '', pyver='3.3', rootdir=r'D:\Winpython',
1177
+ # make_all(3 , '', pyver='3.4', rootdir=r'D:\Winpython',
1178
+ # verbose=False, archis=(32, ))
1179
+ make_all (3 , '' , pyver = '3.4' , rootdir = r'D:\Winpython' ,
1180
+ verbose = False , archis = (64 , ), flavor = '' )
1181
+ #make_all(8 , '', pyver='3.3', rootdir=r'D:\Winpython',
1163
1182
# verbose=False, archis=(32, ))
1164
- #make_all(7 , '', pyver='3.3', rootdir=r'D:\Winpython',
1183
+ #make_all(8 , '', pyver='3.3', rootdir=r'D:\Winpython',
1165
1184
# verbose=False, archis=(64, ))
1166
- #make_all(4 , '', pyver='2.7', rootdir=r'D:\Winpython',
1185
+ #make_all(5 , '', pyver='2.7', rootdir=r'D:\Winpython',
1167
1186
# verbose=False, archis=(32, ))
1168
- #make_all(4 , '', pyver='2.7', rootdir=r'D:\Winpython',
1187
+ #make_all(5 , '', pyver='2.7', rootdir=r'D:\Winpython',
1169
1188
# verbose=False, archis=(64, ))
1170
- #make_all(4, '', pyver='2.7', rootdir=r'D:\Winpython',
1171
- # verbose=False, archis=(64, ), flavor='FlavorRfull')
1172
- #make_all(2, '', pyver='3.4', rootdir=r'D:\Winpython',
1189
+ #make_all(3, '', pyver='3.4', rootdir=r'D:\Winpython',
1173
1190
# verbose=False, archis=(64, ), flavor='FlavorIgraph')
1174
- #make_all(2 , '', pyver='3.4', rootdir=r'D:\Winpython',
1191
+ #make_all(3 , '', pyver='3.4', rootdir=r'D:\Winpython',
1175
1192
# verbose=False, archis=(32, ), flavor='FlavorKivy')
1176
- #make_all(2 , '', pyver='3.4', rootdir=r'D:\Winpython',
1193
+ #make_all(3 , '', pyver='3.4', rootdir=r'D:\Winpython',
1177
1194
# verbose=False, archis=(32, ), flavor='FlavorRfull')
1178
- #make_all(2 , '', pyver='3.4', rootdir=r'D:\Winpython',
1195
+ #make_all(3 , '', pyver='3.4', rootdir=r'D:\Winpython',
1179
1196
# verbose=False, archis=(64, ), flavor='FlavorRfull')
1180
- #make_all(2 , '', pyver='3.4', rootdir=r'D:\Winpython',
1197
+ #make_all(3 , '', pyver='3.4', rootdir=r'D:\Winpython',
1181
1198
# verbose=False, archis=(32, ), flavor='FlavorJulia')
1182
- #make_all(2 , '', pyver='3.4', rootdir=r'D:\Winpython',
1199
+ #make_all(3 , '', pyver='3.4', rootdir=r'D:\Winpython',
1183
1200
# verbose=False, archis=(64, ), flavor='FlavorJulia')
1184
- #make_all(2 , '', pyver='3.4', rootdir=r'D:\Winpython',
1201
+ #make_all(3 , '', pyver='3.4', rootdir=r'D:\Winpython',
1185
1202
# verbose=False, archis=(32, ), flavor='FlavorRJulia')
0 commit comments