8000 bug fix · winpython/winpython@68597a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68597a5

Browse files
author
stonebig
committed
bug fix
1 parent 98ad988 commit 68597a5

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

make.py

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ def __init__(self, build_number, release_level, target, wheeldir,
127127
self.rootdir = rootdir # addded to build from winpython
128128
self.install_options = install_options
129129
self.flavor = flavor
130+
self.QT_API='pyqt' # default Qt4
131+
import glob
132+
if len(glob.glob(osp.join(self.wheeldir, 'PyQt5*.*'))) > 0:
133+
self.QT_API='pyqt5' # force Qt5 on Spyder
134+
print('QT_API is "%s"' % self.QT_API)
130135

131136
@property
132137
def package_index_wiki(self):
@@ -338,7 +343,8 @@ def create_launcher(self, name, icon, command=None,
338343
data += [('R_HOME', '$EXEDIR%s' % r'\tools\R'),
339344
('JULIA_PKGDIR', '$EXEDIR%s' % r'\settings\.julia'),
340345
('JULIA_HOME', '$EXEDIR%s' % r'\tools\Julia\bin'),
341-
('JULIA', '$EXEDIR%s' % r'\tools\Julia\bin\julia.exe')]
346+
('JULIA', '$EXEDIR%s' % r'\tools\Julia\bin\julia.exe'),
347+
('QT_API', '%s' % self.QT_API)]
342348

343349
if settingspath is not None:
344350
data += [('SETTINGSDIR', osp.dirname(settingspath)),
@@ -625,7 +631,10 @@ def _create_batch_scripts_initial(self):
625631
set JULIA_PKGDIR=%WINPYDIR%\..\settings\.julia
626632
:julia_bad
627633
628-
set PATH=""" + path)
634+
set PATH=""" + path + """
635+
636+
rem force default Qt kit for Spyder
637+
set QT_API=""" + self.QT_API)
629638

630639
def _create_batch_scripts(self):
631640
"""Create batch scripts"""
@@ -641,29 +650,6 @@ def _create_batch_scripts(self):
641650
The environment variables are set-up in 'env.bat'.""")
642651
conv = lambda path: ";".join(['%WINPYDIR%\\'+pth for pth in path])
643652
path = conv(self.prepath) + ";%PATH%;" + conv(self.postpath)
644-
self.create_batch_script('env.bat', """@echo off
645-
set WINPYDIR=%~dp0..\\""" + self.python_name + r"""
646-
set WINPYVER=""" + self.winpyver + r"""
647-
set HOME=%WINPYDIR%\..\settings
648-
set WINPYARCH="WIN32"
649-
if "%WINPYDIR:~-5%"=="amd64" set WINPYARCH="WIN-AMD64"
650-
651-
rem handle R if included
652-
if not exist "%WINPYDIR%\..\tools\R\bin" goto r_bad
653-
set R_HOME=%WINPYDIR%\..\tools\R
654-
if %WINPYARCH%=="WIN32" set R_HOMEbin=%R_HOME%\bin\i386
655-
if not %WINPYARCH%=="WIN32" set R_HOMEbin=%R_HOME%\bin\x64
656-
:r_bad
657-
658-
rem handle Julia if included
659-
if not exist "%WINPYDIR%\..\tools\Julia\bin" goto julia_bad
660-
set JULIA_HOME=%WINPYDIR%\..\tools\Julia\bin\
661-
set JULIA_EXE=julia.exe
662-
set JULIA=%JULIA_HOME%%JULIA_EXE%
663-
set JULIA_PKGDIR=%WINPYDIR%\..\settings\.julia
664-
:julia_bad
665-
666-
set PATH=""" + path)
667653

668654

669655
self.create_batch_script('Add_or_removeLine.vbs',r"""

0 commit comments

Comments
 (0)
0