当前位置: 首页>>代码示例>>Python>>正文


Python pyproject.load_pyproject_toml方法代码示例

本文整理汇总了Python中pip._internal.pyproject.load_pyproject_toml方法的典型用法代码示例。如果您正苦于以下问题:Python pyproject.load_pyproject_toml方法的具体用法?Python pyproject.load_pyproject_toml怎么用?Python pyproject.load_pyproject_toml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pip._internal.pyproject的用法示例。


在下文中一共展示了pyproject.load_pyproject_toml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: load_pyproject_toml

# 需要导入模块: from pip._internal import pyproject [as 别名]
# 或者: from pip._internal.pyproject import load_pyproject_toml [as 别名]
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) 
开发者ID:luckystarufo,项目名称:pySINDy,代码行数:25,代码来源:req_install.py

示例2: load_pyproject_toml

# 需要导入模块: from pip._internal import pyproject [as 别名]
# 或者: from pip._internal.pyproject import load_pyproject_toml [as 别名]
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,
        ) 
开发者ID:pantsbuild,项目名称:pex,代码行数:29,代码来源:req_install.py

示例3: load_pyproject_toml

# 需要导入模块: from pip._internal import pyproject [as 别名]
# 或者: from pip._internal.pyproject import load_pyproject_toml [as 别名]
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 
开发者ID:QData,项目名称:deepWordBug,代码行数:42,代码来源:req_install.py

示例4: load_pyproject_toml

# 需要导入模块: from pip._internal import pyproject [as 别名]
# 或者: from pip._internal.pyproject import load_pyproject_toml [as 别名]
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 = pyproject_toml_data
        self.requirements_to_check = check
        self.pyproject_requires = requires
        self.pep517_backend = Pep517HookCaller(
            self.unpacked_source_directory, backend
        ) 
开发者ID:boris-kz,项目名称:CogAlg,代码行数:29,代码来源:req_install.py

示例5: load_pyproject_toml

# 需要导入模块: from pip._internal import pyproject [as 别名]
# 或者: from pip._internal.pyproject import load_pyproject_toml [as 别名]
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,  # 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 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:46,代码来源:req_install.py

示例6: load_pyproject_toml

# 需要导入模块: from pip._internal import pyproject [as 别名]
# 或者: from pip._internal.pyproject import load_pyproject_toml [as 别名]
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)
        )

        self.use_pep517 = (pyproject_toml_data is not None)

        if not self.use_pep517:
            return

        requires, backend, check = pyproject_toml_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,  # 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 
开发者ID:V1EngineeringInc,项目名称:V1EngineeringInc-Docs,代码行数:47,代码来源:req_install.py


注:本文中的pip._internal.pyproject.load_pyproject_toml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。