ggcode 1.1.32__tar.gz → 1.1.34__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.
- {ggcode-1.1.32 → ggcode-1.1.34}/PKG-INFO +1 -1
- {ggcode-1.1.32 → ggcode-1.1.34}/ggcode.egg-info/PKG-INFO +1 -1
- {ggcode-1.1.32 → ggcode-1.1.34}/ggcode_release_installer/cli.py +20 -3
- {ggcode-1.1.32 → ggcode-1.1.34}/pyproject.toml +1 -1
- {ggcode-1.1.32 → ggcode-1.1.34}/README.md +0 -0
- {ggcode-1.1.32 → ggcode-1.1.34}/ggcode.egg-info/SOURCES.txt +0 -0
- {ggcode-1.1.32 → ggcode-1.1.34}/ggcode.egg-info/dependency_links.txt +0 -0
- {ggcode-1.1.32 → ggcode-1.1.34}/ggcode.egg-info/entry_points.txt +0 -0
- {ggcode-1.1.32 → ggcode-1.1.34}/ggcode.egg-info/top_level.txt +0 -0
- {ggcode-1.1.32 → ggcode-1.1.34}/ggcode_release_installer/__init__.py +0 -0
- {ggcode-1.1.32 → ggcode-1.1.34}/setup.cfg +0 -0
- {ggcode-1.1.32 → ggcode-1.1.34}/tests/test_cli.py +0 -0
|
@@ -10,6 +10,7 @@ import shutil
|
|
|
10
10
|
import stat
|
|
11
11
|
import subprocess
|
|
12
12
|
import sys
|
|
13
|
+
import ssl
|
|
13
14
|
import tarfile
|
|
14
15
|
import tempfile
|
|
15
16
|
import urllib.parse
|
|
@@ -86,8 +87,20 @@ def metadata_path(directory: Path) -> Path:
|
|
|
86
87
|
return directory / METADATA
|
|
87
88
|
|
|
88
89
|
|
|
90
|
+
def _build_ssl_context() -> ssl.SSLContext:
|
|
91
|
+
ctx = ssl.create_default_context()
|
|
92
|
+
ctx.check_hostname = False
|
|
93
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
94
|
+
return ctx
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _urlopen(url: str) -> object:
|
|
98
|
+
ctx = _build_ssl_context()
|
|
99
|
+
return urllib.request.urlopen(url, context=ctx)
|
|
100
|
+
|
|
101
|
+
|
|
89
102
|
def download(url: str) -> bytes:
|
|
90
|
-
with
|
|
103
|
+
with _urlopen(url) as response:
|
|
91
104
|
return response.read()
|
|
92
105
|
|
|
93
106
|
|
|
@@ -95,7 +108,7 @@ def resolve_release_version(version: str) -> str:
|
|
|
95
108
|
if version != "latest":
|
|
96
109
|
return version
|
|
97
110
|
|
|
98
|
-
with
|
|
111
|
+
with _urlopen(f"https://github.com/{OWNER}/{REPO}/releases/latest") as response:
|
|
99
112
|
final_url = response.geturl()
|
|
100
113
|
|
|
101
114
|
parsed = urllib.parse.urlparse(final_url)
|
|
@@ -130,7 +143,11 @@ def existing_install(requested_version: str, binary_name: str) -> InstallResult
|
|
|
130
143
|
binary_path = directory / binary_name
|
|
131
144
|
if not binary_path.exists():
|
|
132
145
|
continue
|
|
133
|
-
metadata = read_metadata(directory)
|
|
146
|
+
metadata = read_metadata(directory)
|
|
147
|
+
if metadata is None:
|
|
148
|
+
# No .ggcode-wrapper.json means this binary was not installed by the wrapper
|
|
149
|
+
# (e.g. a Python pip entry point script with the same name). Skip it.
|
|
150
|
+
continue
|
|
134
151
|
if requested_version != "latest" and metadata.get("version") != requested_version:
|
|
135
152
|
continue
|
|
136
153
|
path_updated = ensure_installed_path(directory)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|