rhdl 0.1.0.post1729172676__py3-none-any.whl → 0.1.0.post1729615558__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.
Potentially problematic release.
This version of rhdl might be problematic. Click here for more details.
- {rhdl-0.1.0.post1729172676.dist-info → rhdl-0.1.0.post1729615558.dist-info}/METADATA +1 -1
- rhdl-0.1.0.post1729615558.dist-info/RECORD +17 -0
- rhdlcli/api.py +10 -2
- rhdlcli/downloader.py +1 -8
- rhdlcli/fs.py +0 -18
- rhdlcli/options.py +1 -1
- rhdl-0.1.0.post1729172676.dist-info/RECORD +0 -17
- {rhdl-0.1.0.post1729172676.dist-info → rhdl-0.1.0.post1729615558.dist-info}/LICENSE +0 -0
- {rhdl-0.1.0.post1729172676.dist-info → rhdl-0.1.0.post1729615558.dist-info}/WHEEL +0 -0
- {rhdl-0.1.0.post1729172676.dist-info → rhdl-0.1.0.post1729615558.dist-info}/entry_points.txt +0 -0
- {rhdl-0.1.0.post1729172676.dist-info → rhdl-0.1.0.post1729615558.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
rhdlcli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
rhdlcli/api.py,sha256=nyTh8uso5KeLW6GYK3kY76UVNWBhYomBml_dMYNd2cU,4054
|
|
3
|
+
rhdlcli/cli.py,sha256=T3vP-7zKstOWAVtbd-vZknSZogvgxImkoOSc0aUrQak,3271
|
|
4
|
+
rhdlcli/downloader.py,sha256=MQQ2w_xbb69iw_0cTJ7EiGa66edzB1sqgJfUrfL-8e8,1330
|
|
5
|
+
rhdlcli/files.py,sha256=SMYUn0aI4V9yueV6S-ymmbIrFf_gVQa0VSWVC_vqxBg,1560
|
|
6
|
+
rhdlcli/fs.py,sha256=tEO-5EujnTLmKN-IsH6Vj6ePISGOgHvgyUTQG0wYR7M,544
|
|
7
|
+
rhdlcli/main.py,sha256=nb6HJu0-0duVlDtp9T6H6cYMcau8Bt9AcX6-4oLWivo,1110
|
|
8
|
+
rhdlcli/options.py,sha256=-I9WWUvjbNTcDvVxIQ-oxJeGDBkfizNtLPe4rp8LKZs,1875
|
|
9
|
+
rhdlcli/stats.py,sha256=MvwxMr4LAm3PM5qiEnuB8thUgzBolWPLKg6ql53QU_Y,786
|
|
10
|
+
rhdlcli/validator.py,sha256=tuxTiqmDn84QFFfk95Wq54tNtAQQmhNvQGRsWJGdzww,874
|
|
11
|
+
rhdlcli/version.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
|
|
12
|
+
rhdl-0.1.0.post1729615558.dist-info/LICENSE,sha256=RVVnHNsitM_UrrOOZTEpvbjNHs-IZ4wgkeaWaYeNXRE,11337
|
|
13
|
+
rhdl-0.1.0.post1729615558.dist-info/METADATA,sha256=BwPu51A7Xv_RxnWwcbgCAwDjpXs2lttudDCCet_u4UE,456
|
|
14
|
+
rhdl-0.1.0.post1729615558.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
15
|
+
rhdl-0.1.0.post1729615558.dist-info/entry_points.txt,sha256=JWiBdHm5nD1m3_XZR0QtIuPmuvsJKE-43YhQxCINb8w,43
|
|
16
|
+
rhdl-0.1.0.post1729615558.dist-info/top_level.txt,sha256=1kLkHuRFxHGxPUkrCL28sF6wqXmu3IGhJT858T4XRaI,8
|
|
17
|
+
rhdl-0.1.0.post1729615558.dist-info/RECORD,,
|
rhdlcli/api.py
CHANGED
|
@@ -24,12 +24,20 @@ class HmacSession(requests.Session):
|
|
|
24
24
|
self.secret_key = secret_key
|
|
25
25
|
super(HmacSession, self).__init__()
|
|
26
26
|
|
|
27
|
-
def request(self, method, url, *args, **kwargs):
|
|
27
|
+
def request(self, method, url, *args, allow_redirects=True, **kwargs):
|
|
28
28
|
url = urljoin(self.base_url, url)
|
|
29
29
|
auth = HmacAuthBase(
|
|
30
30
|
self.access_key, self.secret_key, service="api", region="us-east-1"
|
|
31
31
|
)
|
|
32
|
-
|
|
32
|
+
response = super(HmacSession, self).request(
|
|
33
|
+
method, url, auth=auth, allow_redirects=False, *args, **kwargs
|
|
34
|
+
)
|
|
35
|
+
if response.status_code == 302 and allow_redirects:
|
|
36
|
+
redirect_url = response.headers.get("Location")
|
|
37
|
+
return super(HmacSession, self).request(
|
|
38
|
+
method, redirect_url, *args, **kwargs
|
|
39
|
+
)
|
|
40
|
+
return response
|
|
33
41
|
|
|
34
42
|
|
|
35
43
|
def retry(tries=3, delay=2, multiplier=2):
|
rhdlcli/downloader.py
CHANGED
|
@@ -10,11 +10,7 @@ from rhdlcli.api import (
|
|
|
10
10
|
)
|
|
11
11
|
from rhdlcli.stats import check_download_folder_has_enough_space
|
|
12
12
|
from rhdlcli.files import get_files_to_remove, filter_files
|
|
13
|
-
from rhdlcli.fs import
|
|
14
|
-
mkdir_p,
|
|
15
|
-
delete_all_symlink_in_path,
|
|
16
|
-
recreate_symlinks,
|
|
17
|
-
)
|
|
13
|
+
from rhdlcli.fs import mkdir_p
|
|
18
14
|
|
|
19
15
|
|
|
20
16
|
def clean_download_folder(download_folder, files):
|
|
@@ -27,8 +23,6 @@ def clean_download_folder(download_folder, files):
|
|
|
27
23
|
print(f"Remove file {file}")
|
|
28
24
|
os.remove(file)
|
|
29
25
|
|
|
30
|
-
delete_all_symlink_in_path(download_folder)
|
|
31
|
-
|
|
32
26
|
|
|
33
27
|
def download_component(options):
|
|
34
28
|
component = get_component(options)
|
|
@@ -46,4 +40,3 @@ def download_component(options):
|
|
|
46
40
|
clean_download_folder(download_folder, files)
|
|
47
41
|
check_download_folder_has_enough_space(download_folder, files)
|
|
48
42
|
download_files(session, download_folder, files)
|
|
49
|
-
recreate_symlinks(download_folder, files_list["symlinks"])
|
rhdlcli/fs.py
CHANGED
|
@@ -18,24 +18,6 @@ def create_parent_dir(path):
|
|
|
18
18
|
mkdir_p(os.path.dirname(path))
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
def delete_all_symlink_in_path(path):
|
|
22
|
-
for root, dirs, files in os.walk(path):
|
|
23
|
-
for file in files:
|
|
24
|
-
file_path = os.path.join(root, file)
|
|
25
|
-
if os.path.islink(file_path):
|
|
26
|
-
os.unlink(file_path)
|
|
27
|
-
for dir in dirs:
|
|
28
|
-
folder_path = os.path.join(root, dir)
|
|
29
|
-
if os.path.islink(folder_path):
|
|
30
|
-
os.unlink(folder_path)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def recreate_symlinks(download_folder, symlinks):
|
|
34
|
-
for symlink in symlinks:
|
|
35
|
-
link_path = os.path.join(download_folder, symlink["path"], symlink["name"])
|
|
36
|
-
os.symlink(symlink["destination"], link_path)
|
|
37
|
-
|
|
38
|
-
|
|
39
21
|
def get_config_path(env_variables):
|
|
40
22
|
path = env_variables.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
|
41
23
|
return os.path.join(path, "rhdl")
|
rhdlcli/options.py
CHANGED
|
@@ -24,7 +24,7 @@ def build_options(cwd, arguments, env_variables):
|
|
|
24
24
|
options.update(
|
|
25
25
|
{
|
|
26
26
|
"app_config_path": app_config_path,
|
|
27
|
-
"base_url": env_variables.get("
|
|
27
|
+
"base_url": env_variables.get("RHDL_API_URL", credentials.get("base_url")),
|
|
28
28
|
"access_key": env_variables.get(
|
|
29
29
|
"RHDL_ACCESS_KEY", credentials.get("access_key")
|
|
30
30
|
),
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
rhdlcli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
rhdlcli/api.py,sha256=qgWsVA2Vy5FrgdXuh9gkze6h0ERY4-B0ODrwzVMNexQ,3718
|
|
3
|
-
rhdlcli/cli.py,sha256=T3vP-7zKstOWAVtbd-vZknSZogvgxImkoOSc0aUrQak,3271
|
|
4
|
-
rhdlcli/downloader.py,sha256=ueJxdmER3t4AJ0KIwcIF0YZIlQi4KnVZcAXvbYuaVnM,1506
|
|
5
|
-
rhdlcli/files.py,sha256=SMYUn0aI4V9yueV6S-ymmbIrFf_gVQa0VSWVC_vqxBg,1560
|
|
6
|
-
rhdlcli/fs.py,sha256=WHdCR_12n1upJvucjsZHvxZIlVcLk0VsbQGW2DRjCFM,1160
|
|
7
|
-
rhdlcli/main.py,sha256=nb6HJu0-0duVlDtp9T6H6cYMcau8Bt9AcX6-4oLWivo,1110
|
|
8
|
-
rhdlcli/options.py,sha256=GoJtaIXCwd0909-fH8e4gldYIZHipEOOoPm-_mEj7qA,1876
|
|
9
|
-
rhdlcli/stats.py,sha256=MvwxMr4LAm3PM5qiEnuB8thUgzBolWPLKg6ql53QU_Y,786
|
|
10
|
-
rhdlcli/validator.py,sha256=tuxTiqmDn84QFFfk95Wq54tNtAQQmhNvQGRsWJGdzww,874
|
|
11
|
-
rhdlcli/version.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
|
|
12
|
-
rhdl-0.1.0.post1729172676.dist-info/LICENSE,sha256=RVVnHNsitM_UrrOOZTEpvbjNHs-IZ4wgkeaWaYeNXRE,11337
|
|
13
|
-
rhdl-0.1.0.post1729172676.dist-info/METADATA,sha256=7ieUO3N2kq4ZaiB-GCO87-M3Nlxk7te1hEp2fbsn-KA,456
|
|
14
|
-
rhdl-0.1.0.post1729172676.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
15
|
-
rhdl-0.1.0.post1729172676.dist-info/entry_points.txt,sha256=JWiBdHm5nD1m3_XZR0QtIuPmuvsJKE-43YhQxCINb8w,43
|
|
16
|
-
rhdl-0.1.0.post1729172676.dist-info/top_level.txt,sha256=1kLkHuRFxHGxPUkrCL28sF6wqXmu3IGhJT858T4XRaI,8
|
|
17
|
-
rhdl-0.1.0.post1729172676.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{rhdl-0.1.0.post1729172676.dist-info → rhdl-0.1.0.post1729615558.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|