tappack 0.3.0__tar.gz → 0.3.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.
- {tappack-0.3.0 → tappack-0.3.2}/PKG-INFO +1 -1
- {tappack-0.3.0 → tappack-0.3.2}/tappack/constants.py +1 -1
- {tappack-0.3.0 → tappack-0.3.2}/tappack/source.py +14 -7
- tappack-0.3.2/tappack/version +1 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack.egg-info/PKG-INFO +1 -1
- tappack-0.3.0/tappack/version +0 -1
- {tappack-0.3.0 → tappack-0.3.2}/README.md +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/setup.cfg +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/setup.py +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack/__init__.py +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack/autoexec.be.template +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack/packaging.py +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack/patch.py +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack/server.py +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack/tunnel.py +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack.egg-info/SOURCES.txt +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack.egg-info/dependency_links.txt +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack.egg-info/entry_points.txt +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack.egg-info/requires.txt +0 -0
- {tappack-0.3.0 → tappack-0.3.2}/tappack.egg-info/top_level.txt +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import io
|
|
2
2
|
import logging
|
|
3
|
+
import requests
|
|
4
|
+
import yaml
|
|
3
5
|
import zipfile
|
|
4
6
|
from functools import cached_property
|
|
5
7
|
from pathlib import Path
|
|
6
8
|
|
|
7
|
-
import requests
|
|
8
|
-
import yaml
|
|
9
|
-
|
|
10
9
|
from tappack.constants import ENCODING, NAME_MANIFEST
|
|
11
10
|
from tappack.patch import Version
|
|
12
11
|
|
|
@@ -212,6 +211,7 @@ class URL(Source):
|
|
|
212
211
|
def get_content(self):
|
|
213
212
|
print(f'Downloading dependency "{self.name}" from "{self.url}"...')
|
|
214
213
|
response = requests.get(self.url)
|
|
214
|
+
response.raise_for_status()
|
|
215
215
|
return response.content
|
|
216
216
|
|
|
217
217
|
def iter_files(self, prefix=None):
|
|
@@ -232,15 +232,16 @@ class URL(Source):
|
|
|
232
232
|
|
|
233
233
|
class GitHubReleaseAsset(URL):
|
|
234
234
|
|
|
235
|
-
def __init__(self, name, org, repo, filename, version=None, channel_id=None):
|
|
235
|
+
def __init__(self, name, org, repo, filename, version=None, prefix='v', channel_id=None):
|
|
236
236
|
self.name = name
|
|
237
237
|
self.org = org
|
|
238
238
|
self.repo = repo
|
|
239
239
|
self.filename = filename
|
|
240
240
|
self.version = version
|
|
241
241
|
self.channel_id = channel_id
|
|
242
|
+
self.prefix = prefix
|
|
242
243
|
|
|
243
|
-
def
|
|
244
|
+
def get_tag_latest(self):
|
|
244
245
|
url = f"https://api.github.com/repos/{self.org}/{self.repo}/releases/latest"
|
|
245
246
|
|
|
246
247
|
headers = {
|
|
@@ -258,10 +259,16 @@ class GitHubReleaseAsset(URL):
|
|
|
258
259
|
|
|
259
260
|
return tag
|
|
260
261
|
|
|
262
|
+
@cached_property
|
|
263
|
+
def tag(self):
|
|
264
|
+
if not self.version:
|
|
265
|
+
return None
|
|
266
|
+
return f'{self.prefix or ""}{self.version}'
|
|
267
|
+
|
|
261
268
|
@cached_property
|
|
262
269
|
def url(self):
|
|
263
|
-
|
|
264
|
-
url = f'https://github.com/{self.org}/{self.repo}/releases/download/{
|
|
270
|
+
tag = self.tag or self.get_tag_latest()
|
|
271
|
+
url = f'https://github.com/{self.org}/{self.repo}/releases/download/{tag}/{self.filename}'
|
|
265
272
|
|
|
266
273
|
return url
|
|
267
274
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.2
|
tappack-0.3.0/tappack/version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.3.0
|
|
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
|