def load_pyproject_toml(self): # type: () -> None """Load the pyproject.toml file. After calling this routine, all of the attributes related to PEP 517 processing for this requirement have been set. In particular, the use_pep517 attribute can be used to determine whether we should follow the PEP 517 or legacy (setup.py) code path. """ pep517_data = load_pyproject_toml(self.use_pep517, self.pyproject_toml, self.setup_py, str(self)) if pep517_data is None: self.use_pep517 = False else: self.use_pep517 = True requires, backend, check = pep517_data self.requirements_to_check = check self.pyproject_requires = requires self.pep517_backend = Pep517HookCaller(self.setup_py_dir, backend) # Use a custom function to call subprocesses self.spin_message = "" def runner(cmd, cwd=None, extra_environ=None): with open_spinner(self.spin_message) as spinner: call_subprocess(cmd, cwd=cwd, extra_environ=extra_environ, show_stdout=False, spinner=spinner) self.spin_message = "" self.pep517_backend._subprocess_runner = runner
def load_pyproject_toml(self): # type: () -> None """Load the pyproject.toml file. After calling this routine, all of the attributes related to PEP 517 processing for this requirement have been set. In particular, the use_pep517 attribute can be used to determine whether we should follow the PEP 517 or legacy (setup.py) code path. """ pyproject_toml_data = load_pyproject_toml(self.use_pep517, self.pyproject_toml_path, self.setup_py_path, str(self)) if pyproject_toml_data is None: self.use_pep517 = False return self.use_pep517 = True requires, backend, check, backend_path = pyproject_toml_data self.requirements_to_check = check self.pyproject_requires = requires self.pep517_backend = Pep517HookCaller( self.unpacked_source_directory, backend, backend_path=backend_path, )
def load_pyproject_toml(self): # type: () -> None """Load the pyproject.toml file. After calling this routine, all of the attributes related to PEP 517 processing for this requirement have been set. In particular, the use_pep517 attribute can be used to determine whether we should follow the PEP 517 or legacy (setup.py) code path. """ requires, pep517_data = load_pyproject_toml( self.use_pep517, self.editable, self.pyproject_toml, self.setup_py, str(self) ) use_pep517 = bool(pep517_data) self.use_pep517 = use_pep517 self.pyproject_requires = requires if use_pep517: backend, check = pep517_data self.requirements_to_check = check self.pep517_backend = Pep517HookCaller(self.setup_py_dir, backend) # Use a custom function to call subprocesses self.spin_message = "" def runner( cmd, # type: List[str] cwd=None, # type: Optional[str] extra_environ=None # type: Optional[Mapping[str, Any]] ): # type: (...) -> None with open_spinner(self.spin_message) as spinner: call_subprocess( cmd, cwd=cwd, extra_environ=extra_environ, spinner=spinner ) self.spin_message = "" self.pep517_backend._subprocess_runner = runner
def load_pyproject_toml(self): # type: () -> None """Load the pyproject.toml file. After calling this routine, all of the attributes related to PEP 517 processing for this requirement have been set. In particular, the use_pep517 attribute can be used to determine whether we should follow the PEP 517 or legacy (setup.py) code path. """ pep517_data = load_pyproject_toml( self.use_pep517, self.pyproject_toml, self.setup_py, str(self) ) if pep517_data is None: self.use_pep517 = False else: self.use_pep517 = True requires, backend, check = pep517_data self.requirements_to_check = check self.pyproject_requires = requires self.pep517_backend = Pep517HookCaller(self.setup_py_dir, backend) # Use a custom function to call subprocesses self.spin_message = "" def runner(cmd, cwd=None, extra_environ=None): with open_spinner(self.spin_message) as spinner: call_subprocess( cmd, cwd=cwd, extra_environ=extra_environ, show_stdout=False, spinner=spinner ) self.spin_message = "" self.pep517_backend._subprocess_runner = runner
def load_pyproject_toml(self): """Load the pyproject.toml file. After calling this routine, all of the attributes related to PEP 517 processing for this requirement have been set. In particular, the use_pep517 attribute can be used to determine whether we should follow the PEP 517 or legacy (setup.py) code path. """ pep517_data = load_pyproject_toml( self.use_pep517, self.pyproject_toml, self.setup_py, str(self) ) if pep517_data is None: self.use_pep517 = False else: self.use_pep517 = True requires, backend, check = pep517_data self.requirements_to_check = check self.pyproject_requires = requires self.pep517_backend = Pep517HookCaller(self.setup_py_dir, backend)