OpenQuizz
Une application de gestion des contenus pédagogiques
Wheel Class Reference
Inheritance diagram for Wheel:
Collaboration diagram for Wheel:

Public Member Functions

def __init__ (self, filename=None, sign=False, verify=False)
 
def filename (self)
 
def exists (self)
 
def tags (self)
 
def metadata (self)
 
def get_wheel_metadata (self, zf)
 
def info (self)
 
def process_shebang (self, data)
 
def get_hash (self, data, hash_kind=None)
 
def write_record (self, records, record_path, base)
 
def write_records (self, info, libdir, archive_paths)
 
def build_zip (self, pathname, archive_paths)
 
def build (self, paths, tags=None, wheel_version=None)
 
def skip_entry (self, arcname)
 
def install (self, paths, maker, **kwargs)
 
def is_compatible (self)
 
def is_mountable (self)
 
def mount (self, append=False)
 
def unmount (self)
 
def verify (self)
 
def update (self, modifier, dest_dir=None, **kwargs)
 

Data Fields

 sign
 
 should_verify
 
 buildver
 
 pyver
 
 abi
 
 arch
 
 dirname
 
 name
 
 version
 

Static Public Attributes

 wheel_version
 
 hash_kind
 

Detailed Description

Class to build and install from Wheel files (PEP 427).

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  filename = None,
  sign = False,
  verify = False 
)
Initialise an instance using a (valid) filename.

Member Function Documentation

◆ build()

def build (   self,
  paths,
  tags = None,
  wheel_version = None 
)
Build a wheel from files in specified paths, and use any specified tags
when determining the name of the wheel.

◆ build_zip()

def build_zip (   self,
  pathname,
  archive_paths 
)

◆ exists()

def exists (   self)

◆ filename()

def filename (   self)
Build and return a filename from the various components.

◆ get_hash()

def get_hash (   self,
  data,
  hash_kind = None 
)

◆ get_wheel_metadata()

def get_wheel_metadata (   self,
  zf 
)

◆ info()

def info (   self)

◆ install()

def install (   self,
  paths,
  maker,
**  kwargs 
)
Install a wheel to the specified paths. If kwarg ``warner`` is
specified, it should be a callable, which will be called with two
tuples indicating the wheel version of this software and the wheel
version in the file, if there is a discrepancy in the versions.
This can be used to issue any warnings to raise any exceptions.
If kwarg ``lib_only`` is True, only the purelib/platlib files are
installed, and the headers, scripts, data and dist-info metadata are
not written. If kwarg ``bytecode_hashed_invalidation`` is True, written
bytecode will try to use file-hash based invalidation (PEP-552) on
supported interpreter versions (CPython 2.7+).

The return value is a :class:`InstalledDistribution` instance unless
``options.lib_only`` is True, in which case the return value is ``None``.

◆ is_compatible()

def is_compatible (   self)
Determine if a wheel is compatible with the running system.

◆ is_mountable()

def is_mountable (   self)
Determine if a wheel is asserted as mountable by its metadata.

◆ metadata()

def metadata (   self)

◆ mount()

def mount (   self,
  append = False 
)

◆ process_shebang()

def process_shebang (   self,
  data 
)

◆ skip_entry()

def skip_entry (   self,
  arcname 
)
Determine whether an archive entry should be skipped when verifying
or installing.

◆ tags()

def tags (   self)

◆ unmount()

def unmount (   self)

◆ update()

def update (   self,
  modifier,
  dest_dir = None,
**  kwargs 
)
Update the contents of a wheel in a generic way. The modifier should
be a callable which expects a dictionary argument: its keys are
archive-entry paths, and its values are absolute filesystem paths
where the contents the corresponding archive entries can be found. The
modifier is free to change the contents of the files pointed to, add
new entries and remove entries, before returning. This method will
extract the entire contents of the wheel to a temporary location, call
the modifier, and then use the passed (and possibly updated)
dictionary to write a new wheel. If ``dest_dir`` is specified, the new
wheel is written there -- otherwise, the original wheel is overwritten.

The modifier should return True if it updated the wheel, else False.
This method returns the same value the modifier returns.

◆ verify()

def verify (   self)

◆ write_record()

def write_record (   self,
  records,
  record_path,
  base 
)

◆ write_records()

def write_records (   self,
  info,
  libdir,
  archive_paths 
)

Field Documentation

◆ abi

abi

◆ arch

arch

◆ buildver

buildver

◆ dirname

dirname

◆ hash_kind

hash_kind
static

◆ name

name

◆ pyver

pyver

◆ should_verify

should_verify

◆ sign

sign

◆ version

version

◆ wheel_version

wheel_version
static

The documentation for this class was generated from the following file: