Пример #1
0
 def install(self, environ, version, strict=False, locally=True):
     if not self.found:
         if version is None:
             version = "2.8.12"
         website = ("http://prdownloads.sourceforge.net/wxwindows/",)
         if "windows" in platform.system().lower():
             src_dir = "wxMSW-" + str(version)
             archive = src_dir + ".zip"
             autotools_install(environ, website, archive, src_dir, locally)
         elif locally:
             pass  # TODO non-windows local install
         else:
             global_install(
                 "wxWidgets",
                 website,
                 brew="wxwidgets",
                 port="wxgtk",
                 deb="libwxbase-dev libwxgtk-dev",
                 rpm="wxBase wxGTK-devel",
             )
         if not self.is_installed(environ, version, strict):
             raise Exception("WxGTK installation failed.")
Пример #2
0
 def install(self, environ, version, strict=False, locally=True):
     if not 'darwin' in platform.system().lower():
         return
     mkdir(options.target_build_dir)
     log = open(os.path.join(options.target_build_dir,
                             'macports_setup.log'), 'w')
     python_version = '26'  ## Hard coded due to wxPython
     if not self.found:
         if version is None:
             version = '2.1.3'
         website = ('https://distfiles.macports.org/MacPorts/',)
         src_dir = 'MacPorts-' + str(version)
         archive = src_dir + '.tar.gz'
         autotools_install(environ, website, archive, src_dir, False)
         patch_file('/opt/local/share/macports/Tcl/port1.0/portconfigure.tcl',
                    'default configure.ldflags',
                    '{-L${prefix}/lib}',
                    '{"-L${prefix}/lib -Xlinker -headerpad_max_install_names"}')
         patch_file('/opt/local/etc/macports/macports.conf',
                    'build_arch  i386', '#', '')  ## Also due to wxPython
         admin_check_call(['port', 'selfupdate'], stdout=log, stderr=log)
     if not self.ports_found:
         admin_check_call(['port', 'install', 'python' + python_version,
                           'python_select'], stdout=log, stderr=log)
         admin_check_call(['port', 'select', '--set', 'python',
                           'python' + python_version],
                          stdout=log, stderr=log)
         admin_check_call(['port', 'install',
                           'py' + python_version + '-numpy'],
                          stdout=log, stderr=log)
         admin_check_call(['port', 'install',
                           'py' + python_version + '-py2app'],
                          stdout=log, stderr=log)
     log.close()
     if not self.is_installed(environ, version, strict):
         raise Exception("Macports installation failed.")