module documentation

Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

Class CommandSpec A command spec for a #! header, specified as a list of arguments akin to those passed to Popen.
Class easy_install Manage a download/build/install process
Class PthDistributions A .pth file with Distribution paths in it
Class RewritePthDistributions Undocumented
Class ScriptWriter Encapsulates behavior around writing entry point scripts for console and gui apps.
Class WindowsCommandSpec Undocumented
Class WindowsExecutableLauncherWriter No class docstring; 1/1 class method documented
Class WindowsScriptWriter No class docstring; 1/1 static method, 3/4 class methods documented
Exception EasyInstallDeprecationWarning Warning for EasyInstall deprecations, bypassing suppression.
Function auto_chmod Undocumented
Function chmod Undocumented
Function current_umask Undocumented
Function expand_paths Yield sys.path directories that might contain "old-style" packages
Function extract_wininst_cfg Extract configuration data from a bdist_wininst .exe
Function get_exe_prefixes Get exe->egg path translations for a given .exe file
Function get_site_dirs Return a list of 'site' dirs
Function get_win_launcher Load the Windows launcher (executable) suitable for launching a script.
Function is_64bit Undocumented
Function is_python Is this string a valid Python script?
Function is_python_script Is this text, as a whole, a Python script? (as opposed to shell/bat/etc.
Function is_sh Determine if the specified executable is a .sh (contains a #! line)
Function isascii Undocumented
Function load_launcher_manifest Undocumented
Function nt_quote_arg Quote a command line argument according to Windows parsing rules
Function only_strs Exclude non-str values. Ref #3063.
Function rmtree Undocumented
Function update_dist_caches Fix any globally cached `dist_path` related data
Variable sys_executable Undocumented
Function _collect_zipimporter_cache_entries Return zipimporter cache entry keys related to a given normalized path.
Function _first_line_re Return a regular expression based on first_line_re suitable for matching strings.
Function _one_liner Undocumented
Function _pythonpath Undocumented
Function _remove_and_clear_zip_directory_cache_data Undocumented
Function _to_bytes Undocumented
Function _uncache Undocumented
Function _update_zipimporter_cache Update zipimporter cache data for a given normalized path.
def auto_chmod(func, arg, exc): (source)

Undocumented

def chmod(path, mode): (source)

Undocumented

def current_umask(): (source)

Undocumented

def expand_paths(inputs): (source)

Yield sys.path directories that might contain "old-style" packages

def extract_wininst_cfg(dist_filename): (source)

Extract configuration data from a bdist_wininst .exe Returns a configparser.RawConfigParser, or None

def get_exe_prefixes(exe_filename): (source)

Get exe->egg path translations for a given .exe file

def get_site_dirs(): (source)

Return a list of 'site' dirs

def get_win_launcher(type): (source)

Load the Windows launcher (executable) suitable for launching a script. `type` should be either 'cli' or 'gui' Returns the executable as a byte string.

def is_64bit(): (source)

Undocumented

def is_python(text, filename='<string>'): (source)

Is this string a valid Python script?

def is_python_script(script_text, filename): (source)

Is this text, as a whole, a Python script? (as opposed to shell/bat/etc.

def is_sh(executable): (source)

Determine if the specified executable is a .sh (contains a #! line)

def isascii(s): (source)

Undocumented

def load_launcher_manifest(name): (source)

Undocumented

def nt_quote_arg(arg): (source)

Quote a command line argument according to Windows parsing rules

def only_strs(values): (source)

Exclude non-str values. Ref #3063.

def rmtree(path, ignore_errors=False, onerror=auto_chmod): (source)

Undocumented

def update_dist_caches(dist_path, fix_zipimporter_caches): (source)

Fix any globally cached `dist_path` related data `dist_path` should be a path of a newly installed egg distribution (zipped or unzipped). sys.path_importer_cache contains finder objects that have been cached when importing data from the original distribution. Any such finders need to be cleared since the replacement distribution might be packaged differently, e.g. a zipped egg distribution might get replaced with an unzipped egg folder or vice versa. Having the old finders cached may then cause Python to attempt loading modules from the replacement distribution using an incorrect loader. zipimport.zipimporter objects are Python loaders charged with importing data packaged inside zip archives. If stale loaders referencing the original distribution, are left behind, they can fail to load modules from the replacement distribution. E.g. if an old zipimport.zipimporter instance is used to load data from a new zipped egg archive, it may cause the operation to attempt to locate the requested data in the wrong location - one indicated by the original distribution's zip archive directory information. Such an operation may then fail outright, e.g. report having read a 'bad local file header', or even worse, it may fail silently & return invalid data. zipimport._zip_directory_cache contains cached zip archive directory information for all existing zipimport.zipimporter instances and all such instances connected to the same archive share the same cached directory information. If asked, and the underlying Python implementation allows it, we can fix all existing zipimport.zipimporter instances instead of having to track them down and remove them one by one, by updating their shared cached zip archive directory information. This, of course, assumes that the replacement distribution is packaged as a zipped egg. If not asked to fix existing zipimport.zipimporter instances, we still do our best to clear any remaining zipimport.zipimporter related cached data that might somehow later get used when attempting to load data from the new distribution and thus cause such load operations to fail. Note that when tracking down such remaining stale data, we can not catch every conceivable usage from here, and we clear only those that we know of and have found to cause problems if left alive. Any remaining caches should be updated by whomever is in charge of maintaining them, i.e. they should be ready to handle us replacing their zip archives with new distributions at runtime.

sys_executable = (source)

Undocumented

def _collect_zipimporter_cache_entries(normalized_path, cache): (source)

Return zipimporter cache entry keys related to a given normalized path. Alternative path spellings (e.g. those using different character case or those using alternative path separators) related to the same path are included. Any sub-path entries are included as well, i.e. those corresponding to zip archives embedded in other zip archives.

def _first_line_re(): (source)

Return a regular expression based on first_line_re suitable for matching strings.

def _one_liner(text): (source)

Undocumented

def _pythonpath(): (source)

Undocumented

def _remove_and_clear_zip_directory_cache_data(normalized_path): (source)

Undocumented

def _to_bytes(s): (source)

Undocumented

def _uncache(normalized_path, cache): (source)

Undocumented

def _update_zipimporter_cache(normalized_path, cache, updater=None): (source)

Update zipimporter cache data for a given normalized path. Any sub-path entries are processed as well, i.e. those corresponding to zip archives embedded in other zip archives. Given updater is a callable taking a cache entry key and the original entry (after already removing the entry from the cache), and expected to update the entry and possibly return a new one to be inserted in its place. Returning None indicates that the entry should not be replaced with a new one. If no updater is given, the cache entries are simply removed without any additional processing, the same as if the updater simply returned None.