mct-cli 0.2.7__tar.gz → 0.2.8__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.
- {mct_cli-0.2.7 → mct_cli-0.2.8}/PKG-INFO +1 -1
- {mct_cli-0.2.7 → mct_cli-0.2.8}/pyproject.toml +1 -1
- {mct_cli-0.2.7 → mct_cli-0.2.8}/scripts/update_homebrew_formula.py +23 -8
- {mct_cli-0.2.7 → mct_cli-0.2.8}/uv.lock +1 -1
- {mct_cli-0.2.7 → mct_cli-0.2.8}/.github/workflows/release.yml +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/.gitignore +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/.python-version +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/CLAUDE.md +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/LICENSE +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/README.md +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/scripts/update_bottle_formula.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/__init__.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/cli.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/commands/dock.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/commands/finder.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/commands/keyboard.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/commands/screenshot.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/commands/system.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/config.py +0 -0
- {mct_cli-0.2.7 → mct_cli-0.2.8}/src/mct/defaults.py +0 -0
|
@@ -4,6 +4,7 @@ import json
|
|
|
4
4
|
import re
|
|
5
5
|
import subprocess
|
|
6
6
|
import sys
|
|
7
|
+
import time
|
|
7
8
|
import urllib.request
|
|
8
9
|
|
|
9
10
|
PACKAGE = "mct-cli"
|
|
@@ -23,14 +24,28 @@ def sdist_url_sha256(name, version):
|
|
|
23
24
|
raise RuntimeError(f"No sdist for {name}=={version}")
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
def get_deps(package, version):
|
|
27
|
-
"""Return {name: version} for all transitive pip deps (excluding the package itself).
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
def get_deps(package, version, retries=20, delay=15):
|
|
28
|
+
"""Return {name: version} for all transitive pip deps (excluding the package itself).
|
|
29
|
+
|
|
30
|
+
Retries because pip's simple index propagates slower than the PyPI JSON API.
|
|
31
|
+
"""
|
|
32
|
+
for attempt in range(1, retries + 1):
|
|
33
|
+
try:
|
|
34
|
+
result = subprocess.run(
|
|
35
|
+
[sys.executable, "-m", "pip", "install",
|
|
36
|
+
"--dry-run", "--ignore-installed", "--quiet",
|
|
37
|
+
"--report", "-", f"{package}=={version}"],
|
|
38
|
+
capture_output=True, text=True, check=True,
|
|
39
|
+
)
|
|
40
|
+
break
|
|
41
|
+
except subprocess.CalledProcessError as e:
|
|
42
|
+
if attempt == retries:
|
|
43
|
+
print(f"pip stderr:\n{e.stderr}", file=sys.stderr)
|
|
44
|
+
raise
|
|
45
|
+
print(f"pip failed (attempt {attempt}/{retries}), retrying in {delay}s...")
|
|
46
|
+
if e.stderr:
|
|
47
|
+
print(f" {e.stderr.strip()}", file=sys.stderr)
|
|
48
|
+
time.sleep(delay)
|
|
34
49
|
report = json.loads(result.stdout)
|
|
35
50
|
pkg_names = {package.lower(), package.replace("-", "_").lower()}
|
|
36
51
|
return {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|