def _install_selenium(self): self._ensure_autoinstalled_dir_is_in_sys_path() installer = AutoInstaller(prepend_to_search_path=True, target_dir=self._fs.join( _AUTOINSTALLED_DIR, "urllib3")) installer.install( url= "https://files.pythonhosted.org/packages/ff/44/29655168da441dff66de03952880c6e2d17b252836ff1aa4421fba556424/urllib3-1.25.6.tar.gz", url_subpath="urllib3-1.25.6") minimum_version = '3.5.0' if os.path.isfile( os.path.join(_AUTOINSTALLED_DIR, 'selenium', '__init__.py')): import selenium.webdriver if AutoinstallImportHook.greater_than_equal_to_version( minimum_version, selenium.webdriver.__version__): return try: url, url_subpath = self.get_latest_pypi_url('selenium') except URLError: # URL for installing the minimum required version. url = 'https://files.pythonhosted.org/packages/ac/d7/1928416439d066c60f26c87a8d1b78a8edd64c7d05a0aa917fa97a8ee02d/selenium-3.5.0.tar.gz' url_subpath = 'selenium-{}/selenium'.format(minimum_version) sys.stderr.write( '\nFailed to find latest selenium, falling back to minimum {} version\n' .format(minimum_version)) self._install(url=url, url_subpath=url_subpath)
def _install_pywebsocket(self): pywebsocket_dir = self._fs.join(_AUTOINSTALLED_DIR, "pywebsocket") installer = AutoInstaller(target_dir=pywebsocket_dir) installer.install( url= "http://pywebsocket.googlecode.com/files/mod_pywebsocket-0.7.4.tar.gz", url_subpath="pywebsocket-0.7.4/src/mod_pywebsocket")
def _install_pylint(self): self._ensure_autoinstalled_dir_is_in_sys_path() did_install_something = False if (not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "pylint")) or not self._fs.exists( self._fs.join(_AUTOINSTALLED_DIR, "logilab/astng")) or not self._fs.exists( self._fs.join(_AUTOINSTALLED_DIR, "logilab/common"))): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) files_to_remove = [] if sys.platform == 'win32': files_to_remove = ['test/data/write_protected_file.txt'] did_install_something = installer.install( "http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove) did_install_something |= installer.install( "http://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz#md5=ddaf66e4d85714d9c47a46d4bed406de", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng") did_install_something |= installer.install( 'http://pypi.python.org/packages/source/p/pylint/pylint-0.25.1.tar.gz#md5=728bbc2b339bc3749af013709a7f87a5', url_subpath="pylint-0.25.1", target_name="pylint") return did_install_something
def _install_buildbot(self): # The buildbot package uses jinja2, for example, in buildbot/status/web/base.py. # buildbot imports jinja2 directly (as though it were installed on the system), # so the search path needs to include jinja2. We put jinja2 in # its own directory so that we can include it in the search path # without including other modules as a side effect. jinja_dir = self._fs.join(_AUTOINSTALLED_DIR, "jinja2") installer = AutoInstaller(append_to_search_path=True, target_dir=jinja_dir) did_install_something = installer.install( url="http://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz#md5=1c49a8825c993bfdcf55bb36897d28a2", url_subpath="Jinja2-2.6/jinja2", ) SQLAlchemy_dir = self._fs.join(_AUTOINSTALLED_DIR, "sqlalchemy") installer = AutoInstaller(append_to_search_path=True, target_dir=SQLAlchemy_dir) did_install_something |= installer.install( url="http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.7.7.tar.gz#md5=ddf6df7e014cea318fa981364f3f93b9", url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy", ) did_install_something |= self._install( "http://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz#md5=b6727d2810c692062c657492bcbeac6a", "buildbot-0.8.6p1/buildbot", ) return did_install_something
def _install_pylint(self): self._ensure_autoinstalled_dir_is_in_sys_path() did_install_something = False if ( not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "pylint")) or not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "logilab/astng")) or not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "logilab/common")) ): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) files_to_remove = [] if sys.platform == "win32": files_to_remove = ["test/data/write_protected_file.txt"] did_install_something = installer.install( "http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove, ) did_install_something |= installer.install( "http://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz#md5=ddaf66e4d85714d9c47a46d4bed406de", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng", ) did_install_something |= installer.install( "http://pypi.python.org/packages/source/p/pylint/pylint-0.25.1.tar.gz#md5=728bbc2b339bc3749af013709a7f87a5", url_subpath="pylint-0.25.1", target_name="pylint", ) return did_install_something
def _install_toml(self): toml_dir = self._fs.join(_AUTOINSTALLED_DIR, "toml") installer = AutoInstaller(prepend_to_search_path=True, target_dir=toml_dir) installer.install( url= "https://files.pythonhosted.org/packages/b9/19/5cbd78eac8b1783671c40e34bb0fa83133a06d340a38b55c645076d40094/toml-0.10.0.tar.gz", url_subpath="toml-0.10.0/toml")
def _install_twisted(self): twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install( url= "https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5", url_subpath="Twisted-12.1.0/twisted")
def _install_coverage(self): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) did_install_something = installer.install(url="http://pypi.python.org/packages/source/c/coverage/coverage-3.5.1.tar.gz#md5=410d4c8155a4dab222f2bc51212d4a24", url_subpath="coverage-3.5.1/coverage") # Note that coverage needs to be under a directory already in sys.path for its # internal imports to work correctly :(. if not _AUTOINSTALLED_DIR in sys.path: sys.path.append(_AUTOINSTALLED_DIR) return did_install_something
def _install_pylint(self): self._ensure_autoinstalled_dir_is_in_sys_path() did_install_something = False if not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "pylint")): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) did_install_something = installer.install("http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common") did_install_something |= installer.install("http://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz#md5=ddaf66e4d85714d9c47a46d4bed406de", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng") did_install_something |= installer.install('http://pypi.python.org/packages/source/p/pylint/pylint-0.25.1.tar.gz#md5=728bbc2b339bc3749af013709a7f87a5', url_subpath="pylint-0.25.1", target_name="pylint") return did_install_something
def _install_irc(self): # Since irclib and ircbot are two top-level packages, we need to import # them separately. We group them into an irc package for better # organization purposes. irc_dir = self._fs.join(_AUTOINSTALLED_DIR, "irc") installer = AutoInstaller(target_dir=irc_dir) installer.install(url="http://downloads.sourceforge.net/project/python-irclib/python-irclib/0.4.8/python-irclib-0.4.8.zip", url_subpath="irclib.py") installer.install(url="http://downloads.sourceforge.net/project/python-irclib/python-irclib/0.4.8/python-irclib-0.4.8.zip", url_subpath="ircbot.py")
def _install_irc(self): # Since irclib and ircbot are two top-level packages, we need to import # them separately. We group them into an irc package for better # organization purposes. irc_dir = self._fs.join(_AUTOINSTALLED_DIR, "irc") installer = AutoInstaller(target_dir=irc_dir) did_install_something = installer.install(url="http://downloads.sourceforge.net/project/python-irclib/python-irclib/0.4.8/python-irclib-0.4.8.zip", url_subpath="irclib.py") did_install_something |= installer.install(url="http://downloads.sourceforge.net/project/python-irclib/python-irclib/0.4.8/python-irclib-0.4.8.zip", url_subpath="ircbot.py") return did_install_something
def _install_buildbot(self): # The buildbot package uses jinja2, for example, in buildbot/status/web/base.py. # buildbot imports jinja2 directly (as though it were installed on the system), # so the search path needs to include jinja2. We put jinja2 in # its own directory so that we can include it in the search path # without including other modules as a side effect. jinja_dir = self._fs.join(_AUTOINSTALLED_DIR, "jinja2") installer = AutoInstaller(append_to_search_path=True, target_dir=jinja_dir) installer.install(url="http://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz#md5=1c49a8825c993bfdcf55bb36897d28a2", url_subpath="Jinja2-2.6/jinja2") self._install("http://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.4p2.tar.gz#md5=7597d945724c80c0ab476e833a1026cb", "buildbot-0.8.4p2/buildbot")
def _install_buildbot(self): # The buildbot package uses jinja2, for example, in buildbot/status/web/base.py. # buildbot imports jinja2 directly (as though it were installed on the system), # so the search path needs to include jinja2. We put jinja2 in # its own directory so that we can include it in the search path # without including other modules as a side effect. jinja_dir = self._fs.join(_AUTOINSTALLED_DIR, "jinja2") installer = AutoInstaller(append_to_search_path=True, target_dir=jinja_dir) installer.install( url= "http://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz#md5=1c49a8825c993bfdcf55bb36897d28a2", url_subpath="Jinja2-2.6/jinja2") SQLAlchemy_dir = self._fs.join(_AUTOINSTALLED_DIR, "sqlalchemy") installer = AutoInstaller(append_to_search_path=True, target_dir=SQLAlchemy_dir) installer.install( url= "http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.7.7.tar.gz#md5=ddf6df7e014cea318fa981364f3f93b9", url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy") self._install( "http://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz#md5=b6727d2810c692062c657492bcbeac6a", "buildbot-0.8.6p1/buildbot")
def _install_mechanize(self): # The mechanize package uses ClientForm, for example, in _html.py. # Since mechanize imports ClientForm in the following way, # # > import sgmllib, ClientForm # # the search path needs to include ClientForm. We put ClientForm in # its own directory so that we can include it in the search path # without including other modules as a side effect. clientform_dir = self._fs.join(_AUTOINSTALLED_DIR, "clientform") installer = AutoInstaller(append_to_search_path=True, target_dir=clientform_dir) installer.install(url="http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.zip", url_subpath="ClientForm.py") self._install("http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip", "mechanize")
def _install_modules(self): modules_file_path = self._filesystem.join(self._layout_root, "imported", "w3c", "resources", "WPTModules") if not self._filesystem.isfile(modules_file_path): _log.warning("Cannot read " + modules_file_path) return modules = json.loads(self._filesystem.read_text_file(modules_file_path)) for module in modules: AutoInstaller(target_dir=self._filesystem.join(self._doc_root, module["path"])).install(url=module["url"], url_subpath=module["url_subpath"], target_name=module["name"])
def _install_pylint(self): self._ensure_autoinstalled_dir_is_in_sys_path() if (not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "pylint")) or not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "logilab/astng")) or not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "logilab/common"))): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) files_to_remove = [] if sys.platform == 'win32': files_to_remove = ['test/data/write_protected_file.txt'] installer.install("https://files.pythonhosted.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove) installer.install("https://files.pythonhosted.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng") installer.install('https://files.pythonhosted.org/packages/source/p/pylint/pylint-0.25.2.tar.gz', url_subpath="pylint-0.25.2", target_name="pylint")
def _install_selenium(self): self._ensure_autoinstalled_dir_is_in_sys_path() installer = AutoInstaller(prepend_to_search_path=True, target_dir=self._fs.join(_AUTOINSTALLED_DIR, "urllib3")) installer.install(url="https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz", url_subpath="urllib3-1.24.1") minimum_version = '3.5.0' if os.path.isfile(os.path.join(_AUTOINSTALLED_DIR, 'selenium', '__init__.py')): import selenium.webdriver if AutoinstallImportHook.greater_than_equal_to_version(minimum_version, selenium.webdriver.__version__): return try: url, url_subpath = self.get_latest_pypi_url('selenium') except urllib2.URLError: # URL for installing the minimum required version. url = 'https://files.pythonhosted.org/packages/ac/d7/1928416439d066c60f26c87a8d1b78a8edd64c7d05a0aa917fa97a8ee02d/selenium-3.5.0.tar.gz' url_subpath = 'selenium-{}/selenium'.format(minimum_version) sys.stderr.write('\nFailed to find latest selenium, falling back to minimum {} version\n'.format(minimum_version)) self._install(url=url, url_subpath=url_subpath)
def _install_mechanize(self): # The mechanize package uses ClientForm, for example, in _html.py. # Since mechanize imports ClientForm in the following way, # # > import sgmllib, ClientForm # # the search path needs to include ClientForm. We put ClientForm in # its own directory so that we can include it in the search path # without including other modules as a side effect. clientform_dir = self._fs.join(_AUTOINSTALLED_DIR, "clientform") installer = AutoInstaller(append_to_search_path=True, target_dir=clientform_dir) installer.install( url= "http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.zip", url_subpath="ClientForm.py") self._install( "http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip", "mechanize")
def _install_modules(self): modules_file_path = self._filesystem.join(self._doc_root_path, "..", "resources", "web-platform-tests-modules.json") if not self._filesystem.isfile(modules_file_path): _log.warning("Cannot read " + modules_file_path) return modules = json.loads(self._filesystem.read_text_file(modules_file_path)) for module in modules: path = module["path"] name = path.pop() resolved_url = module["url"] if not resolved_url.startswith("http"): resolved_url = "file://" + urllib.pathname2url(self._filesystem.join(self._doc_root_path, "..", "resources", resolved_url)) AutoInstaller(target_dir=self._filesystem.join(self._doc_root, self._filesystem.sep.join(path))).install(url=resolved_url, url_subpath=module["url_subpath"], target_name=name)
def _install_modules(self): modules_file_path = self._filesystem.join( self._doc_root_path, "..", "resources", "web-platform-tests-modules.json") if not self._filesystem.isfile(modules_file_path): _log.warning("Cannot read " + modules_file_path) return modules = json.loads( self._filesystem.read_text_file(modules_file_path)) for module in modules: AutoInstaller(target_dir=self._filesystem.join( self._doc_root, self._filesystem.sep.join( module["path"]))).install( url=module["url"], url_subpath=module["url_subpath"], target_name=module["name"])
def _install_twisted(self): twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install( url= "https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5", url_subpath="Twisted-12.1.0/twisted") installer.install( url= "https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz#md5=9ae3d24c0c7415deb249dd1a132f0f79", url_subpath="zope.interface-4.1.3/src/zope")
def _install_twisted_15_5_0(self): twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted_15_5_0") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install( url= "https://pypi.python.org/packages/source/T/Twisted/Twisted-15.5.0.tar.bz2#md5=0831d7c90d0020062de0f7287530a285", url_subpath="Twisted-15.5.0/twisted") installer.install( url= "https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz#md5=9ae3d24c0c7415deb249dd1a132f0f79", url_subpath="zope.interface-4.1.3/src/zope")
def _install_twisted_15_5_0(self): twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted_15_5_0") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install( url= "https://files.pythonhosted.org/packages/source/T/Twisted/Twisted-15.5.0.tar.bz2", url_subpath="Twisted-15.5.0/twisted") installer.install( url= "https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz", url_subpath="zope.interface-4.1.3/src/zope")
def _install_pylint(self): self._ensure_autoinstalled_dir_is_in_sys_path() if (not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "pylint")) or not self._fs.exists( self._fs.join(_AUTOINSTALLED_DIR, "logilab/astng")) or not self._fs.exists( self._fs.join(_AUTOINSTALLED_DIR, "logilab/common"))): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) files_to_remove = [] if sys.platform == 'win32': files_to_remove = ['test/data/write_protected_file.txt'] installer.install( "https://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove) installer.install( "https://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz#md5=ddaf66e4d85714d9c47a46d4bed406de", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng") installer.install( 'https://pypi.python.org/packages/source/p/pylint/pylint-0.25.2.tar.gz#md5=d878d7688a4f5290dc5b53a836872400', url_subpath="pylint-0.25.2", target_name="pylint")
# # webkitpy/thirdparty/autoinstalled thirdparty_dir = os.path.dirname(__file__) autoinstalled_dir = os.path.join(thirdparty_dir, "autoinstalled") # We need to download ClientForm since the mechanize package that we download # below requires it. The mechanize package uses ClientForm, for example, # in _html.py. Since mechanize imports ClientForm in the following way, # # > import sgmllib, ClientForm # # the search path needs to include ClientForm. We put ClientForm in # its own directory so that we can include it in the search path without # including other modules as a side effect. clientform_dir = os.path.join(autoinstalled_dir, "clientform") installer = AutoInstaller(append_to_search_path=True, target_dir=clientform_dir) installer.install( url= "http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.zip", url_subpath="ClientForm.py") # The remaining packages do not need to be in the search path, so we create # a new AutoInstaller instance that does not append to the search path. installer = AutoInstaller(target_dir=autoinstalled_dir) installer.install( url= "http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip", url_subpath="mechanize") installer.install( url=
def _install(self, url, url_subpath): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) installer.install(url=url, url_subpath=url_subpath)
def _install_pywebsocket(self): pywebsocket_dir = self._fs.join(_AUTOINSTALLED_DIR, "pywebsocket") installer = AutoInstaller(target_dir=pywebsocket_dir) installer.install(url="http://pywebsocket.googlecode.com/files/mod_pywebsocket-0.6b6.tar.gz", url_subpath="pywebsocket-0.6b6/src/mod_pywebsocket")
def _install_twisted(self): twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5", url_subpath="Twisted-12.1.0/twisted") installer.install(url="https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz#md5=9ae3d24c0c7415deb249dd1a132f0f79", url_subpath="zope.interface-4.1.3/src/zope")
def _install_eliza(self): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) installer.install(url="http://www.adambarth.com/webkit/eliza", target_name="eliza.py")
# # webkitpy/thirdparty/autoinstalled thirdparty_dir = os.path.dirname(__file__) autoinstalled_dir = os.path.join(thirdparty_dir, "autoinstalled") # We need to download ClientForm since the mechanize package that we download # below requires it. The mechanize package uses ClientForm, for example, # in _html.py. Since mechanize imports ClientForm in the following way, # # > import sgmllib, ClientForm # # the search path needs to include ClientForm. We put ClientForm in # its own directory so that we can include it in the search path without # including other modules as a side effect. clientform_dir = os.path.join(autoinstalled_dir, "clientform") installer = AutoInstaller(append_to_search_path=True, target_dir=clientform_dir) installer.install(url="http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.zip", url_subpath="ClientForm.py") # The remaining packages do not need to be in the search path, so we create # a new AutoInstaller instance that does not append to the search path. installer = AutoInstaller(target_dir=autoinstalled_dir) installer.install(url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip", url_subpath="mechanize") installer.install(url="http://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b", url_subpath="pep8-0.5.0/pep8.py") # Since irclib and ircbot are two top-level packages, we need to import # them separately. We group them into an irc package for better # organization purposes.
# # webkitpy/thirdparty/autoinstalled thirdparty_dir = os.path.dirname(__file__) autoinstalled_dir = os.path.join(thirdparty_dir, "autoinstalled") # We need to download ClientForm since the mechanize package that we download # below requires it. The mechanize package uses ClientForm, for example, # in _html.py. Since mechanize imports ClientForm in the following way, # # > import sgmllib, ClientForm # # the search path needs to include ClientForm. We put ClientForm in # its own directory so that we can include it in the search path without # including other modules as a side effect. clientform_dir = os.path.join(autoinstalled_dir, "clientform") installer = AutoInstaller(append_to_search_path=True, target_dir=clientform_dir) installer.install(url="http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.zip", url_subpath="ClientForm.py") # The remaining packages do not need to be in the search path, so we create # a new AutoInstaller instance that does not append to the search path. installer = AutoInstaller(target_dir=autoinstalled_dir) installer.install(url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip", url_subpath="mechanize") installer.install(url="http://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b", url_subpath="pep8-0.5.0/pep8.py") installer.install(url="http://www.adambarth.com/webkit/eliza", target_name="eliza.py") rietveld_dir = os.path.join(autoinstalled_dir, "rietveld")
def _install(self, url, url_subpath=None, target_name=None): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) installer.install(url=url, url_subpath=url_subpath, target_name=target_name)
def _install_twisted(self): twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5", url_subpath="Twisted-12.1.0/twisted")
def _install_coverage(self): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) installer.install(url="http://pypi.python.org/packages/source/c/coverage/coverage-3.5.1.tar.gz#md5=410d4c8155a4dab222f2bc51212d4a24", url_subpath="coverage-3.5.1/coverage")
def _install_coverage(self): installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR) installer.install( url= "http://pypi.python.org/packages/source/c/coverage/coverage-3.5.1.tar.gz#md5=410d4c8155a4dab222f2bc51212d4a24", url_subpath="coverage-3.5.1/coverage")
def _install_buildbot(self): # The buildbot package uses jinja2, for example, in buildbot/status/web/base.py. # buildbot imports jinja2 directly (as though it were installed on the system), # so the search path needs to include jinja2. We put jinja2 in # its own directory so that we can include it in the search path # without including other modules as a side effect. jinja_dir = self._fs.join(_AUTOINSTALLED_DIR, "jinja2") installer = AutoInstaller(append_to_search_path=True, target_dir=jinja_dir) installer.install(url="https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz", url_subpath="Jinja2-2.6/jinja2") SQLAlchemy_dir = self._fs.join(_AUTOINSTALLED_DIR, "sqlalchemy") installer = AutoInstaller(append_to_search_path=True, target_dir=SQLAlchemy_dir) installer.install(url="https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.7.7.tar.gz", url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy") twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install(url="https://files.pythonhosted.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2", url_subpath="Twisted-12.1.0/twisted") self._install("https://files.pythonhosted.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz", "buildbot-0.8.6p1/buildbot")
def _install_twisted_15_5_0(self): twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted_15_5_0") installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-15.5.0.tar.bz2#md5=0831d7c90d0020062de0f7287530a285", url_subpath="Twisted-15.5.0/twisted") installer.install(url="https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz#md5=9ae3d24c0c7415deb249dd1a132f0f79", url_subpath="zope.interface-4.1.3/src/zope")