OpenQuizz
Une application de gestion des contenus pédagogiques
pip._vendor.distlib.util Namespace Reference

Data Structures

class  Cache
 
class  cached_property
 
class  Configurator
 
class  CSVBase
 
class  CSVReader
 
class  CSVWriter
 
class  EventMixin
 
class  ExportEntry
 
class  FileOperator
 
class  HTTP
 
class  HTTPS
 
class  HTTPSConnection
 
class  HTTPSHandler
 
class  HTTPSOnlyHandler
 
class  Progress
 
class  SafeTransport
 
class  Sequencer
 
class  ServerProxy
 
class  SubprocessMixin
 
class  Transport
 

Functions

def parse_marker (marker_string)
 
def parse_requirement (req)
 
def get_resources_dests (resources_root, rules)
 
def in_venv ()
 
def get_executable ()
 
def proceed (prompt, allowed_chars, error_prompt=None, default=None)
 
def extract_by_key (d, keys)
 
def read_exports (stream)
 
def write_exports (exports, stream)
 
def tempdir ()
 
def chdir (d)
 
def socket_timeout (seconds=15)
 
def convert_path (pathname)
 
def resolve (module_name, dotted_path)
 
def get_export_entry (specification)
 
def get_cache_base (suffix=None)
 
def path_to_cache_dir (path)
 
def ensure_slash (s)
 
def parse_credentials (netloc)
 
def get_process_umask ()
 
def is_string_sequence (seq)
 
def split_filename (filename, project_name=None)
 
def parse_name_and_version (p)
 
def get_extras (requested, available)
 
def get_project_data (name)
 
def get_package_data (name, version)
 
def unarchive (archive_filename, dest_dir, format=None, check=True)
 
def zip_dir (directory)
 
def iglob (path_glob)
 
def normalize_name (name)
 

Variables

 ssl
 
 logger
 
 IDENTIFIER
 
 VERSION_IDENTIFIER
 
 COMPARE_OP
 
 MARKER_OP
 
 OR
 
 AND
 
 NON_SPACE
 
 STRING_CHUNK
 
 ENTRY_RE
 
 PROJECT_NAME_AND_VERSION
 
 PYTHON_VERSION
 
 NAME_VERSION_RE
 
 ARCHIVE_EXTENSIONS
 
 UNITS
 
 RICH_GLOB
 

Function Documentation

◆ chdir()

def pip._vendor.distlib.util.chdir (   d)

◆ convert_path()

def pip._vendor.distlib.util.convert_path (   pathname)
Return 'pathname' as a name that will work on the native filesystem.

The path is split on '/' and put back together again using the current
directory separator.  Needed because filenames in the setup script are
always supplied in Unix style, and have to be converted to the local
convention before we can actually use them in the filesystem.  Raises
ValueError on non-Unix-ish systems if 'pathname' either starts or
ends with a slash.

◆ ensure_slash()

def pip._vendor.distlib.util.ensure_slash (   s)

◆ extract_by_key()

def pip._vendor.distlib.util.extract_by_key (   d,
  keys 
)

◆ get_cache_base()

def pip._vendor.distlib.util.get_cache_base (   suffix = None)
Return the default base location for distlib caches. If the directory does
not exist, it is created. Use the suffix provided for the base directory,
and default to '.distlib' if it isn't provided.

On Windows, if LOCALAPPDATA is defined in the environment, then it is
assumed to be a directory, and will be the parent directory of the result.
On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
directory - using os.expanduser('~') - will be the parent directory of
the result.

The result is just the directory '.distlib' in the parent directory as
determined above, or with the name specified with ``suffix``.

◆ get_executable()

def pip._vendor.distlib.util.get_executable ( )

◆ get_export_entry()

def pip._vendor.distlib.util.get_export_entry (   specification)

◆ get_extras()

def pip._vendor.distlib.util.get_extras (   requested,
  available 
)

◆ get_package_data()

def pip._vendor.distlib.util.get_package_data (   name,
  version 
)

◆ get_process_umask()

def pip._vendor.distlib.util.get_process_umask ( )

◆ get_project_data()

def pip._vendor.distlib.util.get_project_data (   name)

◆ get_resources_dests()

def pip._vendor.distlib.util.get_resources_dests (   resources_root,
  rules 
)
Find destinations for resources files

◆ iglob()

def pip._vendor.distlib.util.iglob (   path_glob)
Extended globbing function that supports ** and {opt1,opt2,opt3}.

◆ in_venv()

def pip._vendor.distlib.util.in_venv ( )

◆ is_string_sequence()

def pip._vendor.distlib.util.is_string_sequence (   seq)

◆ normalize_name()

def pip._vendor.distlib.util.normalize_name (   name)
Normalize a python package name a la PEP 503

◆ parse_credentials()

def pip._vendor.distlib.util.parse_credentials (   netloc)

◆ parse_marker()

def pip._vendor.distlib.util.parse_marker (   marker_string)
Parse a marker string and return a dictionary containing a marker expression.

The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
the expression grammar, or strings. A string contained in quotes is to be
interpreted as a literal string, and a string not contained in quotes is a
variable (such as os_name).

◆ parse_name_and_version()

def pip._vendor.distlib.util.parse_name_and_version (   p)
A utility method used to get name and version from a string.

From e.g. a Provides-Dist value.

:param p: A value in a form 'foo (1.0)'
:return: The name and version as a tuple.

◆ parse_requirement()

def pip._vendor.distlib.util.parse_requirement (   req)
Parse a requirement passed in as a string. Return a Container
whose attributes contain the various parts of the requirement.

◆ path_to_cache_dir()

def pip._vendor.distlib.util.path_to_cache_dir (   path)
Convert an absolute path to a directory name for use in a cache.

The algorithm used is:

#. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
#. Any occurrence of ``os.sep`` is replaced with ``'--'``.
#. ``'.cache'`` is appended.

◆ proceed()

def pip._vendor.distlib.util.proceed (   prompt,
  allowed_chars,
  error_prompt = None,
  default = None 
)

◆ read_exports()

def pip._vendor.distlib.util.read_exports (   stream)

◆ resolve()

def pip._vendor.distlib.util.resolve (   module_name,
  dotted_path 
)

◆ socket_timeout()

def pip._vendor.distlib.util.socket_timeout (   seconds = 15)

◆ split_filename()

def pip._vendor.distlib.util.split_filename (   filename,
  project_name = None 
)
Extract name, version, python version from a filename (no extension)

Return name, version, pyver or None

◆ tempdir()

def pip._vendor.distlib.util.tempdir ( )

◆ unarchive()

def pip._vendor.distlib.util.unarchive (   archive_filename,
  dest_dir,
  format = None,
  check = True 
)

◆ write_exports()

def pip._vendor.distlib.util.write_exports (   exports,
  stream 
)

◆ zip_dir()

def pip._vendor.distlib.util.zip_dir (   directory)
zip a directory tree into a BytesIO object

Variable Documentation

◆ AND

AND

◆ ARCHIVE_EXTENSIONS

ARCHIVE_EXTENSIONS

◆ COMPARE_OP

COMPARE_OP

◆ ENTRY_RE

ENTRY_RE

◆ IDENTIFIER

IDENTIFIER

◆ logger

logger

◆ MARKER_OP

MARKER_OP

◆ NAME_VERSION_RE

NAME_VERSION_RE

◆ NON_SPACE

NON_SPACE

◆ OR

OR

◆ PROJECT_NAME_AND_VERSION

PROJECT_NAME_AND_VERSION

◆ PYTHON_VERSION

PYTHON_VERSION

◆ RICH_GLOB

RICH_GLOB

◆ ssl

ssl

◆ STRING_CHUNK

STRING_CHUNK

◆ UNITS

UNITS

◆ VERSION_IDENTIFIER

VERSION_IDENTIFIER