dependence 1.2.1__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dependence-1.2.1 → dependence-1.2.2}/PKG-INFO +2 -2
- {dependence-1.2.1 → dependence-1.2.2}/dependence/freeze.py +28 -5
- {dependence-1.2.1 → dependence-1.2.2}/dependence/upgrade.py +1 -0
- {dependence-1.2.1 → dependence-1.2.2}/pyproject.toml +85 -21
- {dependence-1.2.1 → dependence-1.2.2}/.gitignore +0 -0
- {dependence-1.2.1 → dependence-1.2.2}/README.md +0 -0
- {dependence-1.2.1 → dependence-1.2.2}/dependence/__init__.py +0 -0
- {dependence-1.2.1 → dependence-1.2.2}/dependence/__main__.py +0 -0
- {dependence-1.2.1 → dependence-1.2.2}/dependence/_utilities.py +0 -0
- {dependence-1.2.1 → dependence-1.2.2}/dependence/py.typed +0 -0
- {dependence-1.2.1 → dependence-1.2.2}/dependence/update.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dependence
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: A dependency management tool for python projects
|
|
5
5
|
Project-URL: Documentation, https://dependence.enorganic.org
|
|
6
6
|
Project-URL: Repository, https://github.com/enorganic/dependence
|
|
@@ -13,7 +13,7 @@ Requires-Dist: packaging
|
|
|
13
13
|
Requires-Dist: pip
|
|
14
14
|
Requires-Dist: setuptools>63
|
|
15
15
|
Requires-Dist: tomli-w~=1.2
|
|
16
|
-
Requires-Dist: tomli~=2.
|
|
16
|
+
Requires-Dist: tomli~=2.3
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
|
|
19
19
|
# dependence
|
|
@@ -81,6 +81,7 @@ def get_frozen_requirements( # noqa: C901
|
|
|
81
81
|
*,
|
|
82
82
|
exclude: Iterable[str] = (),
|
|
83
83
|
exclude_recursive: Iterable[str] = (),
|
|
84
|
+
keep_version_specifier: Iterable[str] = (),
|
|
84
85
|
no_version: Iterable[str] = (),
|
|
85
86
|
dependency_order: bool = False,
|
|
86
87
|
reverse: bool = False,
|
|
@@ -101,8 +102,14 @@ def get_frozen_requirements( # noqa: C901
|
|
|
101
102
|
exclude_recursive: One or more distributions to exclude/ignore.
|
|
102
103
|
Note: Excluding a distribution here excludes all requirements which
|
|
103
104
|
would be identified through recursion.
|
|
105
|
+
keep_version_specifier: Keep the original (non-frozen) version
|
|
106
|
+
specifier for package names matching any of these patterns. This
|
|
107
|
+
supercedes `no_version`, if both sets of patterns match a package
|
|
108
|
+
name.
|
|
104
109
|
no_version: Exclude version numbers from the output
|
|
105
|
-
(only return distribution names)
|
|
110
|
+
(only return distribution names). This is superceded by
|
|
111
|
+
`keep_version_specifier`, if both sets of patterns match a package
|
|
112
|
+
name.
|
|
106
113
|
dependency_order: Sort requirements so that dependents
|
|
107
114
|
precede dependencies
|
|
108
115
|
depth: Depth of recursive requirement discovery
|
|
@@ -119,6 +126,10 @@ def get_frozen_requirements( # noqa: C901
|
|
|
119
126
|
no_version = (no_version,)
|
|
120
127
|
elif not isinstance(no_version, tuple):
|
|
121
128
|
no_version = tuple(no_version)
|
|
129
|
+
if isinstance(keep_version_specifier, str):
|
|
130
|
+
keep_version_specifier = (keep_version_specifier,)
|
|
131
|
+
elif not isinstance(keep_version_specifier, tuple):
|
|
132
|
+
keep_version_specifier = tuple(keep_version_specifier)
|
|
122
133
|
# Separate requirement strings from requirement files
|
|
123
134
|
configuration_files: dict[str, dict[str, tuple[str, ...]]] = {}
|
|
124
135
|
requirement_strings: MutableSet[str] = set()
|
|
@@ -191,6 +202,7 @@ def get_frozen_requirements( # noqa: C901
|
|
|
191
202
|
),
|
|
192
203
|
exclude_recursive=set(map(normalize_name, exclude_recursive)),
|
|
193
204
|
no_version=no_version,
|
|
205
|
+
keep_version_specifier=keep_version_specifier,
|
|
194
206
|
depth=depth,
|
|
195
207
|
)
|
|
196
208
|
if dependency_order:
|
|
@@ -217,13 +229,20 @@ def _iter_frozen_requirements(
|
|
|
217
229
|
exclude_recursive: MutableSet[str],
|
|
218
230
|
no_version: Iterable[str] = (),
|
|
219
231
|
depth: int | None = None,
|
|
232
|
+
keep_version_specifier: Iterable[str] = (),
|
|
220
233
|
) -> Iterable[str]:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
234
|
+
# This retains a mapping of distribution names to their original
|
|
235
|
+
# requirement strings in order to return those which match
|
|
236
|
+
# `keep_version_specifier` patterns with their original specifiers
|
|
237
|
+
distribution_names_specifiers: dict[str, str] = {}
|
|
224
238
|
|
|
239
|
+
def get_requirement_string(distribution_name: str) -> str | None:
|
|
240
|
+
if distribution_names_specifiers and (
|
|
241
|
+
distribution_name in distribution_names_specifiers
|
|
242
|
+
):
|
|
243
|
+
return distribution_names_specifiers[distribution_name]
|
|
225
244
|
if (distribution_name in _DO_NOT_PIN_DISTRIBUTION_NAMES) or any(
|
|
226
|
-
|
|
245
|
+
fnmatch(distribution_name, pattern) for pattern in no_version
|
|
227
246
|
):
|
|
228
247
|
return distribution_name
|
|
229
248
|
distribution: Distribution
|
|
@@ -246,6 +265,10 @@ def _iter_frozen_requirements(
|
|
|
246
265
|
)
|
|
247
266
|
if name in exclude_recursive:
|
|
248
267
|
return set()
|
|
268
|
+
if keep_version_specifier and any(
|
|
269
|
+
fnmatch(name, pattern) for pattern in keep_version_specifier
|
|
270
|
+
):
|
|
271
|
+
distribution_names_specifiers[name] = requirement_string
|
|
249
272
|
distribution_names: MutableSet[str] = {name}
|
|
250
273
|
if (depth_ is None) or depth_:
|
|
251
274
|
distribution_names |= get_required_distribution_names(
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = [
|
|
2
|
+
requires = [
|
|
3
|
+
"hatchling",
|
|
4
|
+
]
|
|
3
5
|
build-backend = "hatchling.build"
|
|
4
6
|
|
|
5
7
|
[project]
|
|
6
8
|
name = "dependence"
|
|
7
|
-
version = "1.2.
|
|
9
|
+
version = "1.2.2"
|
|
8
10
|
description = "A dependency management tool for python projects"
|
|
9
11
|
readme = "README.md"
|
|
10
12
|
license = "MIT"
|
|
11
13
|
requires-python = "~=3.9"
|
|
12
|
-
authors = [
|
|
13
|
-
|
|
14
|
+
authors = [
|
|
15
|
+
{ email = "david@belais.me" },
|
|
16
|
+
]
|
|
17
|
+
keywords = [
|
|
18
|
+
"dependencies",
|
|
19
|
+
"requirements",
|
|
20
|
+
]
|
|
14
21
|
dependencies = [
|
|
15
22
|
"packaging",
|
|
16
23
|
"pip",
|
|
17
24
|
"setuptools>63",
|
|
18
25
|
"tomli-w~=1.2",
|
|
19
|
-
"tomli~=2.
|
|
26
|
+
"tomli~=2.3",
|
|
20
27
|
"jsonpointer",
|
|
21
28
|
]
|
|
22
29
|
|
|
@@ -28,21 +35,31 @@ Documentation = "https://dependence.enorganic.org"
|
|
|
28
35
|
Repository = "https://github.com/enorganic/dependence"
|
|
29
36
|
|
|
30
37
|
[tool.hatch.build.targets.sdist]
|
|
31
|
-
packages = [
|
|
38
|
+
packages = [
|
|
39
|
+
"src/dependence",
|
|
40
|
+
]
|
|
32
41
|
|
|
33
42
|
[tool.hatch.build.targets.sdist.sources]
|
|
34
43
|
src = ""
|
|
35
44
|
|
|
36
45
|
[tool.hatch.build.targets.wheel]
|
|
37
|
-
packages = [
|
|
46
|
+
packages = [
|
|
47
|
+
"src/dependence",
|
|
48
|
+
]
|
|
38
49
|
|
|
39
50
|
[tool.hatch.build.targets.wheel.sources]
|
|
40
51
|
src = ""
|
|
41
52
|
|
|
42
53
|
[tool.hatch.envs.default]
|
|
43
54
|
python = "3.9"
|
|
44
|
-
dependencies = [
|
|
45
|
-
|
|
55
|
+
dependencies = [
|
|
56
|
+
"mypy",
|
|
57
|
+
"pytest",
|
|
58
|
+
"ruff",
|
|
59
|
+
]
|
|
60
|
+
pre-install-commands = [
|
|
61
|
+
"uv pip install --upgrade pip setuptools",
|
|
62
|
+
]
|
|
46
63
|
post-install-commands = [
|
|
47
64
|
"hatch run mypy --install-types --non-interactive || echo",
|
|
48
65
|
]
|
|
@@ -50,25 +67,55 @@ post-install-commands = [
|
|
|
50
67
|
[tool.hatch.envs.docs]
|
|
51
68
|
template = "docs"
|
|
52
69
|
python = "3.13"
|
|
53
|
-
dependencies = [
|
|
70
|
+
dependencies = [
|
|
71
|
+
"mkdocs-material",
|
|
72
|
+
"mkdocstrings[python]",
|
|
73
|
+
"black",
|
|
74
|
+
]
|
|
54
75
|
|
|
55
76
|
[tool.hatch.envs.hatch-static-analysis]
|
|
56
77
|
skip-install = false
|
|
57
78
|
|
|
58
79
|
[tool.hatch.envs.hatch-test]
|
|
59
80
|
template = "hatch-test"
|
|
60
|
-
extra-dependencies = [
|
|
61
|
-
|
|
81
|
+
extra-dependencies = [
|
|
82
|
+
"ruff",
|
|
83
|
+
"mypy",
|
|
84
|
+
"flake8",
|
|
85
|
+
"tox",
|
|
86
|
+
"black",
|
|
87
|
+
]
|
|
88
|
+
extra-arguments = [
|
|
89
|
+
"--cache-clear",
|
|
90
|
+
]
|
|
62
91
|
|
|
63
92
|
[[tool.hatch.envs.hatch-test.matrix]]
|
|
64
|
-
python = [
|
|
93
|
+
python = [
|
|
94
|
+
"3.9",
|
|
95
|
+
"3.10",
|
|
96
|
+
"3.11",
|
|
97
|
+
"3.12",
|
|
98
|
+
"3.13",
|
|
99
|
+
]
|
|
65
100
|
|
|
66
101
|
[tool.ruff]
|
|
67
102
|
line-length = 79
|
|
68
103
|
|
|
69
104
|
[tool.ruff.lint]
|
|
70
|
-
ignore = [
|
|
71
|
-
|
|
105
|
+
ignore = [
|
|
106
|
+
"F842",
|
|
107
|
+
"INP001",
|
|
108
|
+
]
|
|
109
|
+
extend-select = [
|
|
110
|
+
"E",
|
|
111
|
+
"F",
|
|
112
|
+
"UP",
|
|
113
|
+
"B",
|
|
114
|
+
"SIM",
|
|
115
|
+
"I",
|
|
116
|
+
"C",
|
|
117
|
+
"N",
|
|
118
|
+
]
|
|
72
119
|
|
|
73
120
|
[tool.ruff.lint.mccabe]
|
|
74
121
|
max-complexity = 10
|
|
@@ -79,21 +126,38 @@ docstring-code-line-length = 20
|
|
|
79
126
|
|
|
80
127
|
[tool.black]
|
|
81
128
|
line-length = 79
|
|
82
|
-
target-version = [
|
|
129
|
+
target-version = [
|
|
130
|
+
"py39",
|
|
131
|
+
"py310",
|
|
132
|
+
"py311",
|
|
133
|
+
"py312",
|
|
134
|
+
"py313",
|
|
135
|
+
]
|
|
83
136
|
|
|
84
137
|
[tool.mypy]
|
|
85
138
|
python_version = "3.9"
|
|
86
|
-
files = [
|
|
87
|
-
|
|
139
|
+
files = [
|
|
140
|
+
"src",
|
|
141
|
+
"tests",
|
|
142
|
+
]
|
|
143
|
+
exclude = [
|
|
144
|
+
"tests/test_projects",
|
|
145
|
+
]
|
|
88
146
|
disallow_untyped_defs = true
|
|
89
147
|
disallow_incomplete_defs = true
|
|
90
148
|
|
|
91
149
|
[tool.coverage.run]
|
|
92
|
-
include = [
|
|
93
|
-
|
|
150
|
+
include = [
|
|
151
|
+
"src/**/*.py",
|
|
152
|
+
]
|
|
153
|
+
omit = [
|
|
154
|
+
"src/**/_*.py",
|
|
155
|
+
]
|
|
94
156
|
|
|
95
157
|
[tool.coverage.paths]
|
|
96
|
-
source = [
|
|
158
|
+
source = [
|
|
159
|
+
"src/**",
|
|
160
|
+
]
|
|
97
161
|
|
|
98
162
|
[tool.coverage.report]
|
|
99
163
|
fail_under = 70
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|