OpenQuizz
Une application de gestion des contenus pédagogiques
|
Data Structures | |
class | CommandSpec |
class | easy_install |
class | EasyInstallDeprecationWarning |
class | PthDistributions |
class | RewritePthDistributions |
class | ScriptWriter |
class | WindowsCommandSpec |
class | WindowsExecutableLauncherWriter |
class | WindowsScriptWriter |
Functions | |
def | is_64bit () |
def | samefile (p1, p2) |
def | isascii (s) |
def | get_site_dirs () |
def | expand_paths (inputs) |
def | extract_wininst_cfg (dist_filename) |
def | get_exe_prefixes (exe_filename) |
def | auto_chmod (func, arg, exc) |
def | update_dist_caches (dist_path, fix_zipimporter_caches) |
def | is_python (text, filename='< string >') |
def | is_sh (executable) |
def | nt_quote_arg (arg) |
def | is_python_script (script_text, filename) |
def | chmod (path, mode) |
def | get_win_launcher (type) |
def | load_launcher_manifest (name) |
def | rmtree (path, ignore_errors=False, onerror=auto_chmod) |
def | current_umask () |
Variables | |
category | |
PthDistributions | |
sys_executable | |
get_script_args | |
get_script_header | |
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.readthedocs.io/en/latest/easy_install.html
def setuptools.command.easy_install.auto_chmod | ( | func, | |
arg, | |||
exc | |||
) |
def setuptools.command.easy_install.chmod | ( | path, | |
mode | |||
) |
def setuptools.command.easy_install.current_umask | ( | ) |
def setuptools.command.easy_install.expand_paths | ( | inputs | ) |
Yield sys.path directories that might contain "old-style" packages
def setuptools.command.easy_install.extract_wininst_cfg | ( | dist_filename | ) |
Extract configuration data from a bdist_wininst .exe Returns a configparser.RawConfigParser, or None
def setuptools.command.easy_install.get_exe_prefixes | ( | exe_filename | ) |
Get exe->egg path translations for a given .exe file
def setuptools.command.easy_install.get_site_dirs | ( | ) |
Return a list of 'site' dirs
def setuptools.command.easy_install.get_win_launcher | ( | type | ) |
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 setuptools.command.easy_install.is_64bit | ( | ) |
def setuptools.command.easy_install.is_python | ( | text, | |
filename = '<string>' |
|||
) |
def setuptools.command.easy_install.is_python_script | ( | script_text, | |
filename | |||
) |
Is this text, as a whole, a Python script? (as opposed to shell/bat/etc.
def setuptools.command.easy_install.is_sh | ( | executable | ) |
Determine if the specified executable is a .sh (contains a #! line)
def setuptools.command.easy_install.isascii | ( | s | ) |
def setuptools.command.easy_install.load_launcher_manifest | ( | name | ) |
def setuptools.command.easy_install.nt_quote_arg | ( | arg | ) |
Quote a command line argument according to Windows parsing rules
def setuptools.command.easy_install.rmtree | ( | path, | |
ignore_errors = False , |
|||
onerror = auto_chmod |
|||
) |
def setuptools.command.easy_install.samefile | ( | p1, | |
p2 | |||
) |
Determine if two paths reference the same file. Augments os.path.samefile to work on Windows and suppresses errors if the path doesn't exist.
def setuptools.command.easy_install.update_dist_caches | ( | dist_path, | |
fix_zipimporter_caches | |||
) |
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.
category |
get_script_args |
get_script_header |
sys_executable |