Skip to main content

Generic BeeWare Logo

setuptools_dynamic_dependencies

Python Versions PyPI Version Maturity BSD License Discord server

setuptools_dynamic_dependencies is a setuptools plugin that allows you to define project requirements that are dynamically dependent on other properties (such as project version). This can be useful in monorepositories which contain a "core" package and a number of "backend" packages, and you want to enforce a version dependency between the backend and the core.

Usage

You must be using a pyproject.toml-based project configuration. setup.cfg and setup.py configurations are not supported.

Add setuptools_dynamic_dependencies to the build-system requirements for your project:

[build-system]
requires = ["setuptools_dynamic_dependencies"]

Declare "dependencies" as being dynamic in your [project] table:

[project]
dynamic = ["dependencies"]

Then, add a [tool.setuptools_dynamic_dependencies] section to your configuration. In this section, add an dependencies key for any requirements. In the following example, dynamic-package will be pinned to the same version as the package being built:

[tool.setuptools_dynamic_requires]
dependencies = [
    "dynamic-package == {version}"
]

So - if this was the pyproject.toml for "myproject", and you were building v1.2.3, the dependency would be set to dynamic_package == 1.2.3. This version value can come from a setuptool_scm dynamic version, if required.

You can also specify a [tool.setuptools_dynamic_dependencies.optional-dependencies] to define dynamic optional requirements:

[tool.setuptools_dynamic_dependencies.optional-dependencies]
feature = [
    "dynamic-package == {version}"
]

Community

setuptools_dynamic_dependencies is part of the BeeWare suite. You can talk to the community through:

We foster a welcoming and respectful community as described in our BeeWare Community Code of Conduct.

Contributing

If you experience problems with setuptools_dynamic_dependencies, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

Metadata

Release files for setuptools-dynamic-dependencies 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for setuptools-dynamic-dependencies 1.0.0
File Size Uploaded
setuptools_dynamic_dependencies-1.0.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for setuptools-dynamic-dependencies 1.0.0
File Interpreter ABI Platform
setuptools_dynamic_dependencies-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 kB

Release files / setuptools_dynamic_dependencies-1.0.0.tar.gz

Download URL setuptools_dynamic_dependencies-1.0.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4ee2566acbd83822efee73e0bc865234815359ac54ef851fa751033a67ad532f
BLAKE2b-256 checksum
How to use checksums
ca81c1a0b26eb2e9b001b8719aefd0e351fbf9eaa06ff58cd6479494edb8ef56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release files / setuptools_dynamic_dependencies-1.0.0-py3-none-any.whl

Download URL setuptools_dynamic_dependencies-1.0.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf4366ef91ebcc9f16aac3c1c2c607b76eadf6964d6fd84156ce353a29cffbc6
BLAKE2b-256 checksum
How to use checksums
087be6f08ea8c21dbf01fe83fa13a2cba22d8953c3a78e5c37be2c29b3d9e2fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page