Metadata-Version: 2.4
Name: dynamic-dependencies
Version: 1.0.3
Summary: Dependencies based on `dependency-groups'.
Author-email: Ярыкин Евгений <pypi@zedzhen.ru>
License-Expression: Zlib
Project-URL: source, https://github.com/zedzhen/dynamic-dependencies
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dependency-groups~=1.3
Requires-Dist: tomli~=2.0; python_version < "3.11"
Requires-Dist: typing-extensions~=4.14
Provides-Extra: setuptools
Requires-Dist: dynamic_dependencies_setuptools==1.0.3; extra == "setuptools"
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist

# EN
[RU](#ru)

Dependencies based on `dependency-groups'.

### Usage:
Add `dynamic_dependencies[setuptools]` to `build-system.requires` (in the `pyproject.toml` file).
In the `project.dynamic` list, add `dependencies` (if you define `tool.dynamic_dependencies.require`)
and/or `optional-dependencies` (if you define `tool.dynamic_dependencies.optional`).
```toml
[build-system]
requires = [
  "setuptools>=81.0.0",
  "dynamic_dependencies[setuptools]~=1.0",
]
[project]
dynamic = ["dependencies", "optional-dependencies"]
```

If you use a different backend for the build:
1. Add `dynamic_dependencies` instead of `dynamic_dependencies[setuptools]`.
2. Read the configuration from `pyproject.toml` `dynamic_dependencies.Config.from_pyproject`.
3. Get the dependency lists by calling `dynamic_dependencies.dependencies` and `dynamic_dependencies.optional_dependencies'.
4. Write it down in the distribution information.
5. *If this is a public builder, create a PR/issue to add.

### configuration:
```toml
[tool.dynamic_dependencies]
require = "name1"
[tool.dynamic_dependencies.optional]
grp1 = "name2"
grp2 = "name3"
```

The group `name1` will be added to the required dependencies.
The group `name2` will be added to the optional dependencies as `grp1` (`...[grp1]`).
The group `name3` will be added to the optional dependencies as `grp2` (`...[grp2]`).

# RU
[EN](#en)

Зависимости основанные на `dependency-groups`.

### Использование:
Добавьте `dynamic_dependencies[setuptools]` в `build-system.requires` (в файл `pyproject.toml`).
В список `project.dynamic` добавьте `dependencies` (если определяете `tool.dynamic_dependencies.require`)
и/или `optional-dependencies` (если определяете `tool.dynamic_dependencies.optional`).
```toml
[build-system]
requires = [
  "setuptools>=81.0.0",
  "dynamic_dependencies[setuptools]~=1.0",
]
[project]
dynamic = ["dependencies", "optional-dependencies"]
```

Если вы используете другой бекенд для сборки:
1. Добавьте `dynamic_dependencies`, вместо `dynamic_dependencies[setuptools]`.
2. Прочтите конфигурацию из `pyproject.toml` `dynamic_dependencies.Config.from_pyproject`.
3. Получите списки зависимостей вызвав `dynamic_dependencies.dependencies` и `dynamic_dependencies.optional_dependencies`.
4. Запишите в информацию о дистрибутиве.
5. *Если это публичный сборщик, создайте PR/issue на добавление.

### конфигурация:

```toml
[tool.dynamic_dependencies]
require = "name1"
[tool.dynamic_dependencies.optional]
grp1 = "name2"
grp2 = "name3"
```

Группа `name1` будет добавлена в обязательные зависимости.
Группа `name2` будет добавлена в НЕобязательные зависимости как `grp1` (`...[grp1]`).
Группа `name3` будет добавлена в НЕобязательные зависимости как `grp2` (`...[grp2]`).
