import itertools import os import shlex import shutil import sys from pathlib import Path from typing import cast
import click from pip._internal.commands import create_command from pip._internal.commands.install import InstallCommand from pip._internal.index.package_finder import PackageFinder from pip._internal.metadata import get_environment
from .. import sync from .._compat import Distribution, parse_requirements from ..exceptions import PipToolsError from ..logging import log from ..repositories import PyPIRepository from ..utils import (
flat_map,
get_pip_version_for_python_executable,
get_required_pip_specification,
get_sys_path_for_python_executable,
) from . import options
ifnot src_files: if os.path.exists(DEFAULT_REQUIREMENTS_FILE):
src_files = (DEFAULT_REQUIREMENTS_FILE,) else:
msg = "No requirement files given and no {} found in the current directory"
log.error(msg.format(DEFAULT_REQUIREMENTS_FILE))
sys.exit(2)
if any(src_file.endswith(".in") for src_file in src_files):
msg = ( "Some input files have the .in extension, which is most likely an error " "and can cause weird behaviour. You probably meant to use " "the corresponding *.txt file?"
) if force:
log.warning("WARNING: " + msg) else:
log.error("ERROR: " + msg)
sys.exit(2)
if config:
log.debug(f"Using pip-tools configuration defaults found in '{config !s}'.")
if python_executable:
_validate_python_executable(python_executable)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.