Rosetta
|
Classes | |
class | ContextualZipFile |
Functions | |
def | _python_cmd (*args) |
def | _install (archive_filename, install_args=()) |
def | _build_egg (egg, archive_filename, to_dir) |
def | archive_context (filename) |
def | _do_download (version, download_base, to_dir, download_delay) |
def | use_setuptools (version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=DEFAULT_SAVE_DIR, download_delay=15) |
def | _conflict_bail (VC_err, version) |
def | _unload_pkg_resources () |
def | _clean_check (cmd, target) |
def | download_file_powershell (url, target) |
def | has_powershell () |
def | download_file_curl (url, target) |
def | has_curl () |
def | download_file_wget (url, target) |
def | has_wget () |
def | download_file_insecure (url, target) |
def | get_best_downloader () |
def | download_setuptools (version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=DEFAULT_SAVE_DIR, delay=15, downloader_factory=get_best_downloader) |
def | _build_install_args (options) |
def | _parse_args () |
def | _download_args (options) |
def | main () |
Variables | |
USER_SITE = None | |
string | DEFAULT_VERSION = "33.1.1" |
string | DEFAULT_URL = "https://pypi.io/packages/source/s/setuptools/" |
DEFAULT_SAVE_DIR = os.curdir | |
string | DEFAULT_DEPRECATION_MESSAGE = "ez_setup.py is deprecated and when using it setuptools will be pinned to {0} since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools" |
string | MEANINGFUL_INVALID_ZIP_ERR_MSG = 'Maybe {0} is corrupted, delete it and try again.' |
Setuptools bootstrapping installer. Maintained at https://github.com/pypa/setuptools/tree/bootstrap. Run this script to install or upgrade setuptools. This method is DEPRECATED. Check https://github.com/pypa/setuptools/issues/581 for more details.
|
private |
Build Setuptools egg.
References _python_cmd(), and archive_context().
Referenced by _do_download().
|
private |
Build the arguments to 'python setup.py install' on the setuptools package. Returns list of command line arguments.
Referenced by main().
|
private |
Run the command to download target. If the command fails, clean up before re-raising the error.
Referenced by download_file_curl(), download_file_powershell(), and download_file_wget().
|
private |
Setuptools was imported prior to invocation, so it is unsafe to unload it. Bail out.
Referenced by use_setuptools().
|
private |
Download Setuptools.
References _build_egg(), _unload_pkg_resources(), download_setuptools(), and pyrosetta.tests.distributed.test_dask.format.
Referenced by use_setuptools().
|
private |
Return args for download_setuptools function from cmdline args.
Referenced by main().
|
private |
|
private |
Parse the command line for options.
Referenced by main().
|
private |
Execute a command. Return True if the command succeeded.
Referenced by _build_egg(), and _install().
|
private |
Referenced by _do_download(), and use_setuptools().
def ez_setup.archive_context | ( | filename | ) |
Unzip filename to a temporary directory, set to the cwd. The unzipped target is cleaned up after.
Referenced by _build_egg(), and _install().
def ez_setup.download_file_curl | ( | url, | |
target | |||
) |
References _clean_check().
def ez_setup.download_file_insecure | ( | url, | |
target | |||
) |
Use Python to download the file, without connection authentication.
References basic::database.open().
def ez_setup.download_file_powershell | ( | url, | |
target | |||
) |
Download the file at url to target using Powershell. Powershell will validate trust. Raise an exception if the command cannot complete.
References _clean_check().
def ez_setup.download_file_wget | ( | url, | |
target | |||
) |
References _clean_check().
def ez_setup.download_setuptools | ( | version = DEFAULT_VERSION , |
|
download_base = DEFAULT_URL , |
|||
to_dir = DEFAULT_SAVE_DIR , |
|||
delay = 15 , |
|||
downloader_factory = get_best_downloader |
|||
) |
Download setuptools from a specified location and return its filename. `version` should be a valid setuptools version number that is available as an sdist for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. ``downloader_factory`` should be a function taking no arguments and returning a function for downloading a URL to a target.
Referenced by _do_download(), and main().
def ez_setup.get_best_downloader | ( | ) |
def ez_setup.has_curl | ( | ) |
References basic::database.open().
def ez_setup.has_powershell | ( | ) |
Determine if Powershell is available.
References basic::database.open().
def ez_setup.has_wget | ( | ) |
References basic::database.open().
def ez_setup.main | ( | ) |
Install or upgrade setuptools and EasyInstall.
References _build_install_args(), _download_args(), _install(), _parse_args(), and download_setuptools().
def ez_setup.use_setuptools | ( | version = DEFAULT_VERSION , |
|
download_base = DEFAULT_URL , |
|||
to_dir = DEFAULT_SAVE_DIR , |
|||
download_delay = 15 |
|||
) |
Ensure that a setuptools version is installed. Return None. Raise SystemExit if the requested version or later cannot be installed.
References _conflict_bail(), _do_download(), _unload_pkg_resources(), and set().
string ez_setup.DEFAULT_DEPRECATION_MESSAGE = "ez_setup.py is deprecated and when using it setuptools will be pinned to {0} since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools" |
ez_setup.DEFAULT_SAVE_DIR = os.curdir |
string ez_setup.DEFAULT_URL = "https://pypi.io/packages/source/s/setuptools/" |
string ez_setup.DEFAULT_VERSION = "33.1.1" |
string ez_setup.MEANINGFUL_INVALID_ZIP_ERR_MSG = 'Maybe {0} is corrupted, delete it and try again.' |
ez_setup.USER_SITE = None |