webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
def | __init__ (self, append_to_search_path=False, prepend_to_search_path=False, make_package=True, target_dir=None, temp_dir=None) |
def | install (self, url, should_refresh=False, target_name=None, url_subpath=None, files_to_remove=None) |
Supports automatically installing Python packages from an URL. Supports uncompressed files, .tar.gz, .tar.bz2 and .zip formats. Basic usage: installer = AutoInstaller() 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://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip", url_subpath="mechanize")
def webkitpy.common.system.autoinstall.AutoInstaller.__init__ | ( | self, | |
append_to_search_path = False , |
|||
prepend_to_search_path = False , |
|||
make_package = True , |
|||
target_dir = None , |
|||
temp_dir = None |
|||
) |
Create an AutoInstaller instance, and set up the target directory. Args: append_to_search_path: A boolean value of whether to append the target directory to the sys.path search path. prepend_to_search_path: A boolean value of whether to prepend the target directory to the sys.path search path. make_package: A boolean value of whether to make the target directory a package. This adds an __init__.py file to the target directory -- allowing packages and modules within the target directory to be imported explicitly using dotted module names. target_dir: The directory path to which packages should be installed. Defaults to a subdirectory of the folder containing this module called "autoinstalled". temp_dir: The directory path to use for any temporary files generated while downloading, unzipping, and extracting packages to install. Defaults to a standard temporary location generated by the tempfile module. This parameter should normally be used only for development testing.
def webkitpy.common.system.autoinstall.AutoInstaller.install | ( | self, | |
url, | |||
should_refresh = False , |
|||
target_name = None , |
|||
url_subpath = None , |
|||
files_to_remove = None |
|||
) |
Install a python package from an URL. Args: url: The URL from which to download the package. Optional Args: should_refresh: A boolean value of whether the package should be downloaded and reinstalled again even if the package is already present. target_name: The name of the folder or file in the autoinstaller target directory at which the package should be installed. Defaults to the base name of the URL sub-path. This parameter must be provided if the URL sub-path is not specified. url_subpath: The relative path of the URL directory that should be installed. Defaults to the full directory, or the entire URL contents.