PEP 650: Updates to the API (#1770)
This commit is contained in:
parent
b897f87fc2
commit
602c9f5691
34
pep-0650.rst
34
pep-0650.rst
|
@ -306,10 +306,10 @@ invoke_install
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Installs the dependencies::
|
||||
|
||||
def invoke_install(
|
||||
path : typing.Union[str, bytes, os.PathLike[str]],
|
||||
def invoke_install(
|
||||
path: Union[str, bytes, PathLike[str]],
|
||||
*,
|
||||
dependency_group : string = None,
|
||||
dependency_group: str = None,
|
||||
**kwargs
|
||||
) -> int:
|
||||
...
|
||||
|
@ -340,13 +340,17 @@ invoke_uninstall
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Uninstall the specified dependencies::
|
||||
|
||||
def invoke_uninstall(
|
||||
def invoke_uninstall(
|
||||
path: Union[str, bytes, PathLike[str]],
|
||||
*,
|
||||
dependency_group : string = None,
|
||||
dependency_group: str = None,
|
||||
**kwargs
|
||||
) -> int:
|
||||
...
|
||||
|
||||
* ``path`` : An absolute path where the *installer backend* should be
|
||||
invoked from (e.g. the directory where ``pyproject.toml`` is
|
||||
located).
|
||||
* ``dependency_group`` : An optional flag specifying a dependency
|
||||
group that the *installer backend* should uninstall.
|
||||
* ``**kwargs`` : Arbitrary parameters that a *installer backend* may
|
||||
|
@ -370,11 +374,16 @@ Returns the dependencies that would be installed by
|
|||
installed without parsing the dependency file::
|
||||
|
||||
def get_dependencies_to_install(
|
||||
dependency_group : string = None,
|
||||
path: Union[str, bytes, PathLike[str]],
|
||||
*,
|
||||
dependency_group: str = None,
|
||||
**kwargs
|
||||
) -> List[str]:
|
||||
...
|
||||
|
||||
* ``path`` : An absolute path where the *installer backend* should be
|
||||
invoked from (e.g. the directory where ``pyproject.toml`` is
|
||||
located).
|
||||
* ``dependency_group`` : Specify a dependency group to get the
|
||||
dependencies ``invoke_install(...)`` would install for that
|
||||
dependency group.
|
||||
|
@ -402,9 +411,14 @@ Returns the dependency groups available to be installed. This allows
|
|||
*installer backend* is aware of::
|
||||
|
||||
def get_dependency_groups(
|
||||
path: Union[str, bytes, PathLike[str]],
|
||||
**kwargs
|
||||
) -> FrozenSet[str]
|
||||
) -> FrozenSet[str]:
|
||||
...
|
||||
|
||||
* ``path`` : An absolute path where the *installer backend* should be
|
||||
invoked from (e.g. the directory where ``pyproject.toml`` is
|
||||
located).
|
||||
* ``**kwargs`` : Arbitrary parameters that a *installer backend* may
|
||||
require that are not already specified, allows for backwards
|
||||
compatibility.
|
||||
|
@ -417,13 +431,17 @@ update_dependencies
|
|||
Outputs a dependency file based off of inputted package list::
|
||||
|
||||
def update_dependencies(
|
||||
dependency_specifiers : Iterable[str],
|
||||
path: Union[str, bytes, PathLike[str]],
|
||||
dependency_specifiers: Iterable[str],
|
||||
*,
|
||||
dependency_group=None,
|
||||
**kwargs
|
||||
) -> int:
|
||||
...
|
||||
|
||||
* ``path`` : An absolute path where the *installer backend* should be
|
||||
invoked from (e.g. the directory where ``pyproject.toml`` is
|
||||
located).
|
||||
* ``dependency_specifiers`` : An iterable of dependencies as
|
||||
:pep:`508` strings that are being updated, for example :
|
||||
``["requests==2.8.1", ...]``. Optionally for a specific dependency
|
||||
|
|
Loading…
Reference in New Issue