當前位置: 首頁>>代碼示例>>Python>>正文


Python wrappers.Pep517HookCaller方法代碼示例

本文整理匯總了Python中pip._vendor.pep517.wrappers.Pep517HookCaller方法的典型用法代碼示例。如果您正苦於以下問題:Python wrappers.Pep517HookCaller方法的具體用法?Python wrappers.Pep517HookCaller怎麽用?Python wrappers.Pep517HookCaller使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pip._vendor.pep517.wrappers的用法示例。


在下文中一共展示了wrappers.Pep517HookCaller方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: prepare_pep517_metadata

# 需要導入模塊: from pip._vendor.pep517 import wrappers [as 別名]
# 或者: from pip._vendor.pep517.wrappers import Pep517HookCaller [as 別名]
def prepare_pep517_metadata(self):
        # type: () -> None
        assert self.pep517_backend is not None

        metadata_dir = os.path.join(
            self.setup_py_dir,
            'pip-wheel-metadata'
        )
        ensure_dir(metadata_dir)

        with self.build_env:
            # Note that Pep517HookCaller implements a fallback for
            # prepare_metadata_for_build_wheel, so we don't have to
            # consider the possibility that this hook doesn't exist.
            backend = self.pep517_backend
            self.spin_message = "Preparing wheel metadata"
            distinfo_dir = backend.prepare_metadata_for_build_wheel(
                metadata_dir
            )

        self.metadata_directory = os.path.join(metadata_dir, distinfo_dir) 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:23,代碼來源:req_install.py

示例2: generate_metadata

# 需要導入模塊: from pip._vendor.pep517 import wrappers [as 別名]
# 或者: from pip._vendor.pep517.wrappers import Pep517HookCaller [as 別名]
def generate_metadata(build_env, backend):
    # type: (BuildEnvironment, Pep517HookCaller) -> str
    """Generate metadata using mechanisms described in PEP 517.

    Returns the generated metadata directory.
    """
    metadata_tmpdir = TempDirectory(
        kind="modern-metadata", globally_managed=True
    )

    metadata_dir = metadata_tmpdir.path

    with build_env:
        # Note that Pep517HookCaller implements a fallback for
        # prepare_metadata_for_build_wheel, so we don't have to
        # consider the possibility that this hook doesn't exist.
        runner = runner_with_spinner_message("Preparing wheel metadata")
        with backend.subprocess_runner(runner):
            distinfo_dir = backend.prepare_metadata_for_build_wheel(
                metadata_dir
            )

    return os.path.join(metadata_dir, distinfo_dir) 
開發者ID:pantsbuild,項目名稱:pex,代碼行數:25,代碼來源:metadata.py

示例3: load_pyproject_toml

# 需要導入模塊: from pip._vendor.pep517 import wrappers [as 別名]
# 或者: from pip._vendor.pep517.wrappers import Pep517HookCaller [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

示例4: prepare_pep517_metadata

# 需要導入模塊: from pip._vendor.pep517 import wrappers [as 別名]
# 或者: from pip._vendor.pep517.wrappers import Pep517HookCaller [as 別名]
def prepare_pep517_metadata(self):
        # type: () -> str
        assert self.pep517_backend is not None

        # NOTE: This needs to be refactored to stop using atexit
        metadata_tmpdir = TempDirectory(kind="modern-metadata")
        atexit.register(metadata_tmpdir.cleanup)

        metadata_dir = metadata_tmpdir.path

        with self.build_env:
            # Note that Pep517HookCaller implements a fallback for
            # prepare_metadata_for_build_wheel, so we don't have to
            # consider the possibility that this hook doesn't exist.
            runner = runner_with_spinner_message("Preparing wheel metadata")
            backend = self.pep517_backend
            with backend.subprocess_runner(runner):
                distinfo_dir = backend.prepare_metadata_for_build_wheel(
                    metadata_dir
                )

        return os.path.join(metadata_dir, distinfo_dir) 
開發者ID:boris-kz,項目名稱:CogAlg,代碼行數:24,代碼來源:req_install.py

示例5: load_pyproject_toml

# 需要導入模塊: from pip._vendor.pep517 import wrappers [as 別名]
# 或者: from pip._vendor.pep517.wrappers import Pep517HookCaller [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

示例6: load_pyproject_toml

# 需要導入模塊: from pip._vendor.pep517 import wrappers [as 別名]
# 或者: from pip._vendor.pep517.wrappers import Pep517HookCaller [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

示例7: load_pyproject_toml

# 需要導入模塊: from pip._vendor.pep517 import wrappers [as 別名]
# 或者: from pip._vendor.pep517.wrappers import Pep517HookCaller [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


注:本文中的pip._vendor.pep517.wrappers.Pep517HookCaller方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。