dependence 1.1.1__py3-none-any.whl → 1.1.2__py3-none-any.whl
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/freeze.py +27 -9
- dependence/update.py +3 -0
- {dependence-1.1.1.dist-info → dependence-1.1.2.dist-info}/METADATA +1 -1
- {dependence-1.1.1.dist-info → dependence-1.1.2.dist-info}/RECORD +6 -6
- {dependence-1.1.1.dist-info → dependence-1.1.2.dist-info}/WHEEL +0 -0
- {dependence-1.1.1.dist-info → dependence-1.1.2.dist-info}/entry_points.txt +0 -0
dependence/freeze.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
|
+
import os
|
|
4
5
|
from collections.abc import Iterable, MutableSet
|
|
5
6
|
from fnmatch import fnmatch
|
|
6
7
|
from functools import partial
|
|
@@ -119,7 +120,7 @@ def get_frozen_requirements( # noqa: C901
|
|
|
119
120
|
elif not isinstance(no_version, tuple):
|
|
120
121
|
no_version = tuple(no_version)
|
|
121
122
|
# Separate requirement strings from requirement files
|
|
122
|
-
configuration_files:
|
|
123
|
+
configuration_files: dict[str, dict[str, tuple[str, ...]]] = {}
|
|
123
124
|
requirement_strings: MutableSet[str] = set()
|
|
124
125
|
requirement: str | Path
|
|
125
126
|
for requirement in requirements:
|
|
@@ -129,21 +130,38 @@ def get_frozen_requirements( # noqa: C901
|
|
|
129
130
|
iter_configuration_files(requirement)
|
|
130
131
|
)
|
|
131
132
|
if requirement_configuration_files:
|
|
132
|
-
|
|
133
|
+
is_directory: bool = os.path.isdir(requirement)
|
|
134
|
+
for (
|
|
135
|
+
requirement_configuration_file
|
|
136
|
+
) in requirement_configuration_files:
|
|
137
|
+
configuration_files[requirement_configuration_file] = (
|
|
138
|
+
{"include_pointers": ("/project",)}
|
|
139
|
+
if (
|
|
140
|
+
is_directory
|
|
141
|
+
and os.path.basename(
|
|
142
|
+
requirement_configuration_file
|
|
143
|
+
).lower()
|
|
144
|
+
== "pyproject.toml"
|
|
145
|
+
)
|
|
146
|
+
else {
|
|
147
|
+
"include_pointers": include_pointers,
|
|
148
|
+
"exclude_pointers": exclude_pointers,
|
|
149
|
+
}
|
|
150
|
+
)
|
|
133
151
|
else:
|
|
134
152
|
if requirement.startswith("setup.py"):
|
|
135
153
|
raise ValueError(requirement)
|
|
136
154
|
requirement_strings.add(requirement)
|
|
155
|
+
configuration_file: str
|
|
156
|
+
kwargs: dict[str, tuple[str, ...]]
|
|
137
157
|
frozen_requirements: Iterable[str] = iter_distinct(
|
|
138
158
|
chain(
|
|
139
159
|
requirement_strings,
|
|
140
|
-
*
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
),
|
|
146
|
-
configuration_files,
|
|
160
|
+
*(
|
|
161
|
+
iter_configuration_file_requirement_strings(
|
|
162
|
+
configuration_file, **kwargs
|
|
163
|
+
)
|
|
164
|
+
for configuration_file, kwargs in configuration_files.items()
|
|
147
165
|
),
|
|
148
166
|
)
|
|
149
167
|
)
|
dependence/update.py
CHANGED
|
@@ -137,6 +137,9 @@ def _get_updated_requirement_string(
|
|
|
137
137
|
except KeyError:
|
|
138
138
|
# If the requirement isn't installed, we can't update the version
|
|
139
139
|
pass
|
|
140
|
+
except TypeError as error:
|
|
141
|
+
message = f"Unable to determine installed version for {requirement}"
|
|
142
|
+
raise ValueError(message) from error
|
|
140
143
|
return str(requirement)
|
|
141
144
|
|
|
142
145
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
dependence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
dependence/__main__.py,sha256=zk67MINE1FpsBcXDDvRiHQwmO7_4iay_Rkq3JTPrha4,1802
|
|
3
3
|
dependence/_utilities.py,sha256=CxIl7BkoTqMtrOsJzq544_RDa8-QtZufKj31PazIBFI,36790
|
|
4
|
-
dependence/freeze.py,sha256=
|
|
4
|
+
dependence/freeze.py,sha256=MMv7_feEXfRo8cxyrgK0su17k1k8uLXWwpRCvrj-vz8,16184
|
|
5
5
|
dependence/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
dependence/update.py,sha256=
|
|
6
|
+
dependence/update.py,sha256=QLe6sx39PKM3x6TxMzQxTUPDSKn8d7UizIVpbqMZuJI,20707
|
|
7
7
|
dependence/upgrade.py,sha256=lNovLvKhxiczZAJj2_hHrbkDscNOTrx1xaOhmobVNSI,7747
|
|
8
|
-
dependence-1.1.
|
|
9
|
-
dependence-1.1.
|
|
10
|
-
dependence-1.1.
|
|
11
|
-
dependence-1.1.
|
|
8
|
+
dependence-1.1.2.dist-info/METADATA,sha256=XhMrXo14In72SHqOStXK0bn8NVEm4XqWkbGBWOyUCUo,8364
|
|
9
|
+
dependence-1.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
10
|
+
dependence-1.1.2.dist-info/entry_points.txt,sha256=NStO_B0D81ObVYr9zDs6LCy0whm0a8KCiiFHMmTwOVE,56
|
|
11
|
+
dependence-1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|