@@ -304,7 +304,7 @@ def get_package_fname(self, pattern):
304304 raise RuntimeError (
305305 'Could not found required package matching %s' % pattern )
306306
307- def install_package (self , pattern ):
307+ def install_package (self , pattern , install_options = None ):
308308 """Install package matching pattern"""
309309 fname = self .get_package_fname (pattern )
310310 if fname not in [p .fname for p in self .installed_packages ]:
@@ -313,8 +313,11 @@ def install_package(self, pattern):
313313 self .distribution ._print (pack , "Installing" )
314314 self .distribution ._print_done ()
315315 else :
316- self .distribution .install (pack ,
317- install_options = self .install_options )
316+ if install_options :
317+ self .distribution .install (pack , install_options )
318+ else :
319+ self .distribution .install (pack ,
320+ install_options = self .install_options )
318321 self .installed_packages .append (pack )
319322
320323 def create_batch_script (self , name , contents ):
@@ -362,8 +365,8 @@ def create_launcher(self, name, icon, command=None,
362365
363366 # handle well Flavor with R included
364367 data += [('R_HOME' , '$EXEDIR%s' % r'\tools\R' ),
365- ('JULIA_HOME' ,'$EXEDIR\ %s' % r'tools\Julia\bin' ),
366- ('JULIA' , '$EXEDIR\ %s' % r'tools\Julia\bin\julia.exe' )]
368+ ('JULIA_HOME' ,'$EXEDIR%s' % r'\ tools\Julia\bin' ),
369+ ('JULIA' , '$EXEDIR%s' % r'\ tools\Julia\bin\julia.exe' )]
367370
368371 if settingspath is not None :
369372 data += [('SETTINGSDIR' , osp .dirname (settingspath )),
@@ -424,7 +427,8 @@ def _extract_python(self):
424427 os .mkdir (self .python_dir )
425428 utils .extract_msi (self .python_fname , targetdir = self .python_dir )
426429 os .remove (osp .join (self .python_dir , osp .basename (self .python_fname )))
427- os .mkdir (osp .join (self .python_dir , 'Scripts' ))
430+ if not os .path .exists (osp .join (self .python_dir , 'Scripts' )):
431+ os .mkdir (osp .join (self .python_dir , 'Scripts' ))
428432 self ._print_done ()
429433
430434 def _add_msvc_files (self ):
@@ -469,18 +473,20 @@ def _install_required_packages(self):
469473 print ("Installing required packages" )
470474 self .install_package ('pywin32-([0-9\.]*[a-z]*).%s-py%s.exe'
471475 % (self .py_arch , self .python_version ))
472- self .install_package ('setuptools-([0-9\.]*[a-z]*[0-9]?).%s(-py%s)?.exe'
473- % (self .py_arch , self .python_version ))
474476 # Install First these two packages to support wheel format
475- self .install_package ('pip-([0-9\.]*[a-z]*[0-9]?).%s(-py%s)?.exe'
476- % (self .py_arch , self .python_version ))
477+ if self .python_version == '3.3' :
478+ self .install_package ('get-pip-([0-9\.]*[a-z]*[0-9]?).%s(-py%s)?.exe'
479+ % (self .py_arch , self .python_version ))
480+ #else:
481+ self .install_package ('%s-([0-9\.]*[a-z]*[0-9]?)(.*)(\.exe|\.whl)' %
482+ 'setuptools' , install_options = ['--upgrade' ,'--no-deps' ])
483+ self .install_package ('%s-([0-9\.]*[a-z]*[0-9]?)(.*)(\.exe|\.whl)' %
484+ 'pip' , install_options = ['--upgrade' ,'--no-deps' ])
485+
477486 self .install_package ('wheel-([0-9\.]*[a-z]*[0-9]?).tar.gz' )
478487 # six is needed early
479488 self .install_package ('six-([0-9\.]*[a-z]*[0-9]?)-py2.py3-none-any.whl' )
480489
481- self .install_package (
482- 'spyder(lib)?-([0-9\.]*[a-z]*[0-9]?).%s(-py%s)?.exe'
483- % (self .py_arch , self .python_version ))
484490 # PyQt module is now like :PyQt4-4.10.4-gpl-Py3.4-Qt4.8.6-x32.exe
485491 self .install_package (
486492 'PyQt4-([0-9\.\-]*)-gpl-Py%s-Qt([0-9\.\-]*)%s.exe'
@@ -489,6 +495,10 @@ def _install_required_packages(self):
489495 'PyQwt-([0-9\.]*)-py%s-%s-([a-z0-9\.\-]*).exe'
490496 % (self .python_version , self .pyqt_arch ))
491497
498+ self .install_package (
499+ 'spyder(lib)?-([0-9\.]*[a-z]*[0-9]?).%s(-py%s)?.exe'
500+ % (self .py_arch , self .python_version ))
501+
492502 # Install 'main packages' first (was before Wheel idea, keep for now)
493503 for happy_few in ['numpy-MKL' , 'scipy' , 'matplotlib' , 'pandas' ]:
494504 # can be a wheel now
@@ -1126,14 +1136,14 @@ def make_all(build_number, release_level, pyver,
11261136
11271137 #make_all(4, '', pyver='3.4', rootdir=r'D:\Winpython',
11281138 # verbose=False, archis=(32, ))
1129- # make_all(4, '', pyver='3.4', rootdir=r'D:\Winpython',
1130- # verbose=False, archis=(64, ), flavor='')
1139+ make_all (4 , '' , pyver = '3.4' , rootdir = r'D:\Winpython' ,
1140+ verbose = False , archis = (64 , ), flavor = '' )
11311141 #make_all(5, '', pyver='3.3', rootdir=r'D:\Winpython',
11321142 # verbose=False, archis=(32, ))
11331143 #make_all(5, '', pyver='3.3', rootdir=r'D:\Winpython',
11341144 # verbose=False, archis=(64, ))
1135- make_all (2 , '' , pyver = '2.7' , rootdir = r'D:\Winpython' ,
1136- verbose = False , archis = (32 , ))
1145+ # make_all(2, '', pyver='2.7', rootdir=r'D:\Winpython',
1146+ # verbose=False, archis=(32, ))
11371147 #make_all(2, '', pyver='2.7', rootdir=r'D:\Winpython',
11381148 # verbose=False, archis=(64, ))
11391149 #make_all(2, '', pyver='2.7', rootdir=r'D:\Winpython',
0 commit comments