Skip to content

bug fix #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ def __init__(self, build_number, release_level, target, wheeldir,
self.rootdir = rootdir # addded to build from winpython
self.install_options = install_options
self.flavor = flavor
self.QT_API='pyqt' # default Qt4
import glob
if len(glob.glob(osp.join(self.wheeldir, 'PyQt5*.*'))) > 0:
self.QT_API='pyqt5' # force Qt5 on Spyder
print('QT_API is "%s"' % self.QT_API)

@property
def package_index_wiki(self):
Expand Down Expand Up @@ -338,7 +343,8 @@ def create_launcher(self, name, icon, command=None,
data += [('R_HOME', '$EXEDIR%s' % r'\tools\R'),
('JULIA_PKGDIR', '$EXEDIR%s' % r'\settings\.julia'),
('JULIA_HOME', '$EXEDIR%s' % r'\tools\Julia\bin'),
('JULIA', '$EXEDIR%s' % r'\tools\Julia\bin\julia.exe')]
('JULIA', '$EXEDIR%s' % r'\tools\Julia\bin\julia.exe'),
('QT_API', '%s' % self.QT_API)]

if settingspath is not None:
data += [('SETTINGSDIR', osp.dirname(settingspath)),
Expand Down Expand Up @@ -625,7 +631,10 @@ def _create_batch_scripts_initial(self):
set JULIA_PKGDIR=%WINPYDIR%\..\settings\.julia
:julia_bad

set PATH=""" + path)
set PATH=""" + path + """

rem force default Qt kit for Spyder
set QT_API=""" + self.QT_API)

def _create_batch_scripts(self):
"""Create batch scripts"""
Expand All @@ -641,29 +650,6 @@ def _create_batch_scripts(self):
The environment variables are set-up in 'env.bat'.""")
conv = lambda path: ";".join(['%WINPYDIR%\\'+pth for pth in path])
path = conv(self.prepath) + ";%PATH%;" + conv(self.postpath)
self.create_batch_script('env.bat', """@echo off
set WINPYDIR=%~dp0..\\""" + self.python_name + r"""
set WINPYVER=""" + self.winpyver + r"""
set HOME=%WINPYDIR%\..\settings
set WINPYARCH="WIN32"
if "%WINPYDIR:~-5%"=="amd64" set WINPYARCH="WIN-AMD64"

rem handle R if included
if not exist "%WINPYDIR%\..\tools\R\bin" goto r_bad
set R_HOME=%WINPYDIR%\..\tools\R
if %WINPYARCH%=="WIN32" set R_HOMEbin=%R_HOME%\bin\i386
if not %WINPYARCH%=="WIN32" set R_HOMEbin=%R_HOME%\bin\x64
:r_bad

rem handle Julia if included
if not exist "%WINPYDIR%\..\tools\Julia\bin" goto julia_bad
set JULIA_HOME=%WINPYDIR%\..\tools\Julia\bin\
set JULIA_EXE=julia.exe
set JULIA=%JULIA_HOME%%JULIA_EXE%
set JULIA_PKGDIR=%WINPYDIR%\..\settings\.julia
:julia_bad

set PATH=""" + path)


self.create_batch_script('Add_or_removeLine.vbs',r"""
Expand Down