python-update-checker 0.7__py3-none-any.whl → 0.9.0__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.
- puc/__init__.py +2 -0
- puc/cli.py +13 -1
- puc/uvlock.py +14 -6
- {python_update_checker-0.7.dist-info → python_update_checker-0.9.0.dist-info}/METADATA +1 -1
- python_update_checker-0.9.0.dist-info/RECORD +11 -0
- python_update_checker-0.7.dist-info/RECORD +0 -11
- {python_update_checker-0.7.dist-info → python_update_checker-0.9.0.dist-info}/WHEEL +0 -0
- {python_update_checker-0.7.dist-info → python_update_checker-0.9.0.dist-info}/entry_points.txt +0 -0
puc/__init__.py
CHANGED
puc/cli.py
CHANGED
|
@@ -21,6 +21,7 @@ from .logging import logger
|
|
|
21
21
|
from .pyprojecttoml import handle_pyproject_toml
|
|
22
22
|
from .requirementstxt import handle_requirements_txt
|
|
23
23
|
from .uvlock import handle_uv_lock
|
|
24
|
+
from . import __version__
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def usage(msg: str | None = None) -> None:
|
|
@@ -94,6 +95,13 @@ def get_option_parser() -> argparse.ArgumentParser:
|
|
|
94
95
|
default=False,
|
|
95
96
|
help="Print debug messages.",
|
|
96
97
|
)
|
|
98
|
+
parser.add_argument(
|
|
99
|
+
"--version",
|
|
100
|
+
action="store_true",
|
|
101
|
+
dest="version",
|
|
102
|
+
default=False,
|
|
103
|
+
help="Print version and exit.",
|
|
104
|
+
)
|
|
97
105
|
subparsers = parser.add_subparsers(help='commands', dest='command')
|
|
98
106
|
parser_check = subparsers.add_parser('check', help='check for updated versions')
|
|
99
107
|
parser_check.add_argument(
|
|
@@ -174,7 +182,6 @@ def handle_dependency_file(dep_file: str, optargs, constraint_file):
|
|
|
174
182
|
|
|
175
183
|
def main() -> int:
|
|
176
184
|
"""Parse options and check or update dependencies."""
|
|
177
|
-
logger.info(f"{shlex.join(sys.argv)}")
|
|
178
185
|
# parse options
|
|
179
186
|
try:
|
|
180
187
|
optargs = get_option_parser().parse_args(sys.argv[1:])
|
|
@@ -182,8 +189,13 @@ def main() -> int:
|
|
|
182
189
|
logger.exception(exc)
|
|
183
190
|
usage()
|
|
184
191
|
# handle options
|
|
192
|
+
if optargs.version:
|
|
193
|
+
print(__version__)
|
|
194
|
+
return 0
|
|
185
195
|
if optargs.debug:
|
|
186
196
|
logger.setLevel(logging.DEBUG)
|
|
197
|
+
logger.info(f"{shlex.join(sys.argv)}")
|
|
198
|
+
logger.debug(f"puc version {__version__}")
|
|
187
199
|
remove_constraint_file = False
|
|
188
200
|
constraints = optargs.constraints
|
|
189
201
|
constraint_file = None
|
puc/uvlock.py
CHANGED
|
@@ -49,12 +49,25 @@ def handle_uv_lock(
|
|
|
49
49
|
if version is None:
|
|
50
50
|
logger.warning(f"missing version in package {uvpackage}")
|
|
51
51
|
continue
|
|
52
|
+
# respect package filter
|
|
53
|
+
if packages and canonicalize_name(name) not in packages:
|
|
54
|
+
logger.info(f"skip package {name} due to package filter")
|
|
55
|
+
continue
|
|
56
|
+
# skip virtual packages (ie. the project itself)
|
|
57
|
+
source = uvpackage.get("source", {})
|
|
58
|
+
# skip virtual packages (ie. the project itself)
|
|
59
|
+
if "virtual" in source:
|
|
60
|
+
logger.info(f"skip virtual package {name}")
|
|
61
|
+
continue
|
|
62
|
+
# skip editable packages
|
|
63
|
+
if "editable" in source:
|
|
64
|
+
logger.info(f"skip editable package {name}")
|
|
65
|
+
continue
|
|
52
66
|
updatable += update_uvlock_dependency(
|
|
53
67
|
name,
|
|
54
68
|
version,
|
|
55
69
|
project_dir,
|
|
56
70
|
command=command,
|
|
57
|
-
packages=packages,
|
|
58
71
|
exclude_newer=exclude_newer,
|
|
59
72
|
exclude_newer_package=exclude_newer_package,
|
|
60
73
|
constraint_file=constraint_file,
|
|
@@ -70,17 +83,12 @@ def update_uvlock_dependency(
|
|
|
70
83
|
version,
|
|
71
84
|
project_dir: str,
|
|
72
85
|
command: str | None = None,
|
|
73
|
-
packages=None,
|
|
74
86
|
exclude_newer: str | None = None,
|
|
75
87
|
exclude_newer_package: str | None = None,
|
|
76
88
|
constraint_file: str | None = None,
|
|
77
89
|
color: bool = True,
|
|
78
90
|
) -> int:
|
|
79
91
|
"""Update uv lock dependency."""
|
|
80
|
-
# respect optional package filter
|
|
81
|
-
if packages and canonicalize_name(package) not in packages:
|
|
82
|
-
return 0
|
|
83
|
-
|
|
84
92
|
try:
|
|
85
93
|
latest_version = get_latest_version(
|
|
86
94
|
package,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
puc/__init__.py,sha256=6vxbSxJG-OT3CSpYFH3T3YwpDaFKFz-soKc1Y6RFBA4,90
|
|
2
|
+
puc/cli.py,sha256=vWCY2QL41OWpAjIc0L2v9l1OBSsXAMC9Yvc6C6rJuDg,7726
|
|
3
|
+
puc/dependencies.py,sha256=4XLPiCnulGVT29bVB6Blkh9irjUGxfChP01YqqofYTw,6717
|
|
4
|
+
puc/logging.py,sha256=VBojYqr7-l-aLeNqrBqTJyHuEINzdBx1CObQg5XiC-k,2222
|
|
5
|
+
puc/pyprojecttoml.py,sha256=pJxA9oZoxiiB7b06yr0hub7um1A1eyrKf7WgPf1KBEU,6905
|
|
6
|
+
puc/requirementstxt.py,sha256=xzEKVmWvZVbIQt9lZ0hVykOapn8xX24a7FixX1dY4lU,5076
|
|
7
|
+
puc/uvlock.py,sha256=FujQ6DsuQgb36iyyLgCQIahh_9HGDxRMyFmMUda8uSk,4591
|
|
8
|
+
python_update_checker-0.9.0.dist-info/WHEEL,sha256=y6e-a5KI2W-qDAJKfh9Xr81bin8NgUdfWgz3VSXXpe4,80
|
|
9
|
+
python_update_checker-0.9.0.dist-info/entry_points.txt,sha256=mQuGfBukyjyo7ssOHSIycAlRdQkrA1ewAth6tsV_T60,38
|
|
10
|
+
python_update_checker-0.9.0.dist-info/METADATA,sha256=DSGwpksv2-M8aCd0jmjyDBzLq9I5aM8CqFUPdArFu7Y,4885
|
|
11
|
+
python_update_checker-0.9.0.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
puc/__init__.py,sha256=QCJeo6rsztgAeIuufaaId2f-x_XYLjs4UywOPp4w7ks,67
|
|
2
|
-
puc/cli.py,sha256=mzbs7TZsuI0_PgRgIAzHRxmKDa02cBrLjtn7qTE2wwQ,7417
|
|
3
|
-
puc/dependencies.py,sha256=4XLPiCnulGVT29bVB6Blkh9irjUGxfChP01YqqofYTw,6717
|
|
4
|
-
puc/logging.py,sha256=VBojYqr7-l-aLeNqrBqTJyHuEINzdBx1CObQg5XiC-k,2222
|
|
5
|
-
puc/pyprojecttoml.py,sha256=pJxA9oZoxiiB7b06yr0hub7um1A1eyrKf7WgPf1KBEU,6905
|
|
6
|
-
puc/requirementstxt.py,sha256=xzEKVmWvZVbIQt9lZ0hVykOapn8xX24a7FixX1dY4lU,5076
|
|
7
|
-
puc/uvlock.py,sha256=O_y3iwJ4pfq0wtrDYJoOdmAHn2XY71N0Iql0ycrRoW0,4160
|
|
8
|
-
python_update_checker-0.7.dist-info/WHEEL,sha256=y6e-a5KI2W-qDAJKfh9Xr81bin8NgUdfWgz3VSXXpe4,80
|
|
9
|
-
python_update_checker-0.7.dist-info/entry_points.txt,sha256=mQuGfBukyjyo7ssOHSIycAlRdQkrA1ewAth6tsV_T60,38
|
|
10
|
-
python_update_checker-0.7.dist-info/METADATA,sha256=5rmVjEA_PA4so2oFay-ZbrocnMn7TlYWZQ_cxe1yGxE,4883
|
|
11
|
-
python_update_checker-0.7.dist-info/RECORD,,
|
|
File without changes
|
{python_update_checker-0.7.dist-info → python_update_checker-0.9.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|