Registry / devops / setuptools-dynamic-dependencies

setuptools-dynamic-dependencies

JSON →
library1.0.0pypypi✓ verified 79d ago

A setuptools plugin that allows dependencies to be specified dynamically based on the package's version number. It enables conditional dependency resolution within setup.py/pyproject.toml using version-range expressions. Current version 1.0.0, requires Python >=3.9, maintained by BeeWare project.

pip install setuptools-dynamic-dependencies
INSTALL
IMPORT
SIG · SETUPTOOLS-DYNAMIC
S
setuptools-dynamic-dependencies
devopspythonv1.0.0
Install
2.1s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 20MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

finalize_dependencies
from setuptools_dynamic_dependencies import finalize_dependencies
from setuptools_dynamic_dependencies import DynamicDependencies
tomllib
from setuptools_dynamic_dependencies import tomllib

Basic integration with setuptools setup() to dynamically resolve dependencies based on package version.

from setuptools import setup from setuptools_dynamic_dependencies import DynamicDependencies dynamic_deps = DynamicDependencies() # In setup() call: setup( name='mypackage', version='1.0.0', install_requires=dynamic_deps.get_requirements() )
Debug
Known issues
deprecatedThis plugin is designed for setuptools < 68. Newer setuptools versions (>=68) natively support dynamic dependencies via pyproject.toml. Consider migrating to native setuptools configuration.
fix
Remove plugin and define dynamic dependencies natively in pyproject.toml using setuptools directives.
affects: >=1.0.0
gotchaThe plugin resolves dependencies at build time, not install time. It requires the package's version string to be available (e.g., via version.py or hardcoded). If version is imported from a non-existent file during build, it will fail silently or raise an error.
fix
Ensure version is defined before calling DynamicDependencies, either hardcoded or via a fallback.
affects: all
gotchaVersion-range expressions use a custom syntax (e.g., '>=1.0,<2.0'). Common range operators (e.g., ~=, !=) are not supported. This can cause confusion when migrating from PEP 440 version specifiers.
fix
Read the documentation for supported operators: >, >=, <, <=, ==, and combination with commas.
affects: all
Upgrade
Version history
1.0.0latest on PyPI · released Jan 12, 2025
Audit
Dependencies
setuptoolsrequiredRuntime dependency for plugin integration
Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
setuptools-dynamic-dependencies — pip install setuptools-dynamic-dependencies · libregistry