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

Public Member Functions

def __init__ (self, source_dir, build_backend, backend_path=None, runner=None, python_executable=None)
 
def subprocess_runner (self, runner)
 
def get_requires_for_build_wheel (self, config_settings=None)
 
def prepare_metadata_for_build_wheel (self, metadata_directory, config_settings=None, _allow_fallback=True)
 
def build_wheel (self, wheel_directory, config_settings=None, metadata_directory=None)
 
def get_requires_for_build_sdist (self, config_settings=None)
 
def build_sdist (self, sdist_directory, config_settings=None)
 

Data Fields

 source_dir
 
 build_backend
 
 backend_path
 
 python_executable
 

Detailed Description

A wrapper around a source directory to be built with a PEP 517 backend.

:param source_dir: The path to the source directory, containing
    pyproject.toml.
:param build_backend: The build backend spec, as per PEP 517, from
    pyproject.toml.
:param backend_path: The backend path, as per PEP 517, from pyproject.toml.
:param runner: A callable that invokes the wrapper subprocess.
:param python_executable: The Python executable used to invoke the backend

The 'runner', if provided, must expect the following:

- cmd: a list of strings representing the command and arguments to
  execute, as would be passed to e.g. 'subprocess.check_call'.
- cwd: a string representing the working directory that must be
  used for the subprocess. Corresponds to the provided source_dir.
- extra_environ: a dict mapping environment variable names to values
  which must be set for the subprocess execution.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  source_dir,
  build_backend,
  backend_path = None,
  runner = None,
  python_executable = None 
)

Member Function Documentation

◆ build_sdist()

def build_sdist (   self,
  sdist_directory,
  config_settings = None 
)
Build an sdist from this project.

Returns the name of the newly created file.

This calls the 'build_sdist' backend hook in a subprocess.

◆ build_wheel()

def build_wheel (   self,
  wheel_directory,
  config_settings = None,
  metadata_directory = None 
)
Build a wheel from this project.

Returns the name of the newly created file.

In general, this will call the 'build_wheel' hook in the backend.
However, if that was previously called by
'prepare_metadata_for_build_wheel', and the same metadata_directory is
used, the previously built wheel will be copied to wheel_directory.

◆ get_requires_for_build_sdist()

def get_requires_for_build_sdist (   self,
  config_settings = None 
)
Identify packages required for building a wheel

Returns a list of dependency specifications, e.g.::

    ["setuptools >= 26"]

This does not include requirements specified in pyproject.toml.
It returns the result of calling the equivalently named hook in a
subprocess.

◆ get_requires_for_build_wheel()

def get_requires_for_build_wheel (   self,
  config_settings = None 
)
Identify packages required for building a wheel

Returns a list of dependency specifications, e.g.::

    ["wheel >= 0.25", "setuptools"]

This does not include requirements specified in pyproject.toml.
It returns the result of calling the equivalently named hook in a
subprocess.

◆ prepare_metadata_for_build_wheel()

def prepare_metadata_for_build_wheel (   self,
  metadata_directory,
  config_settings = None,
  _allow_fallback = True 
)
Prepare a ``*.dist-info`` folder with metadata for this project.

Returns the name of the newly created folder.

If the build backend defines a hook with this name, it will be called
in a subprocess. If not, the backend will be asked to build a wheel,
and the dist-info extracted from that (unless _allow_fallback is
False).

◆ subprocess_runner()

def subprocess_runner (   self,
  runner 
)
A context manager for temporarily overriding the default subprocess
runner.

Field Documentation

◆ backend_path

backend_path

◆ build_backend

build_backend

◆ python_executable

python_executable

◆ source_dir

source_dir

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