Skip to content

Commit 1b81e4a

Browse files
committed
update scripts
1 parent 1b7ff3a commit 1b81e4a

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

src/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from gen_index import gen_index
22
from col_whl import get_all_repo_data
3-
from tools import get_saved_hash, get_assets
3+
from tools import get_saved_hash, get_assets, trim_hash_dict
44
from gen_whl import gen_html, get_local_whl, extend_hash_dict, save_hash
55

66

@@ -12,7 +12,9 @@
1212

1313
local_whl = get_local_whl()
1414
hash_dict = extend_hash_dict(hash_dict, local_whl)
15+
16+
hash_dict = trim_hash_dict(wheels, hash_dict)
1517
save_hash(hash_dict)
1618

1719
gen_html(hash_dict)
18-
gen_index(wheels)
20+
# gen_index(wheels)

src/tools.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get_local_whl() -> list[tuple[str, str]]:
101101

102102
def extend_hash_dict(saved_hash: dict, whl_files: list[tuple[str, str]]) -> dict:
103103
saved_wheels = saved_hash.keys()
104-
assert not any(name in saved_wheels for name, _ in whl_files)
104+
assert not any(name in saved_wheels for name, _ in whl_files), r'E:\Cache\whl is not empty!'
105105

106106
print('Calculating hash for local wheels...')
107107
for name, path in tqdm(whl_files):
@@ -110,3 +110,16 @@ def extend_hash_dict(saved_hash: dict, whl_files: list[tuple[str, str]]) -> dict
110110
'verify': False
111111
}
112112
return saved_hash
113+
114+
115+
def trim_hash_dict(pkgs: list[dict], saved_hash: dict) -> dict:
116+
"""
117+
Remove entries in saved_hash that are not in pkgs
118+
"""
119+
new_saved_hash = {}
120+
for pkg in pkgs:
121+
# if pkg['name'] in saved_hash:
122+
# assert
123+
new_saved_hash[pkg['name']] = saved_hash[pkg['name']]
124+
125+
return new_saved_hash

whl/wheels.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3229,6 +3229,7 @@
32293229
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/3.7/PyYAML-6.0.1-pp37-pypy37_pp73-win_amd64.whl#sha256=33436eeab865e119b210da15d559739e85b61313615230d2cdad0dd71d03d1dc">PyYAML-6.0.1-pp37-pypy37_pp73-win_amd64.whl</a><br>
32303230
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/3.8/PyYAML-6.0.1-pp38-pypy38_pp73-win_amd64.whl#sha256=155da4d2f69a45a2a5ab07cc4aab42782dcb567ecf7c96129e84ccf73a52707c">PyYAML-6.0.1-pp38-pypy38_pp73-win_amd64.whl</a><br>
32313231
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/3.9/PyYAML-6.0.1-pp39-pypy39_pp73-win_amd64.whl#sha256=cd20c7fefe17c9b3f7efd6692bbca0115dc5f284a808e72964b501fe6e9e7cb6">PyYAML-6.0.1-pp39-pypy39_pp73-win_amd64.whl</a><br>
3232+
<a href="https://github.com/KumaTea/riscv-wheels/releases/download/2409/PyYAML-6.0.2-cp312-cp312-manylinux_2_31_riscv64.whl#sha256=c01fa9ced759e056eb5f76f2bad8bf0c13e1c5e9d0a093eb91d098507cc8bf85">PyYAML-6.0.2-cp312-cp312-manylinux_2_31_riscv64.whl</a><br>
32323233
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/231201/pyzipcode-3.0.1-py3-none-any.whl#sha256=0921ae55ddccf6da1b2f13d7b020123420235c8e6eb1b6198fdba3c98aacbfbe">pyzipcode-3.0.1-py3-none-any.whl</a><br>
32333234
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/2310/pyzmq-23.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl#sha256=cda2a5c93d1c8d04c1c7aaabdbe60a2e10c9fb1f95a3d2df0d289b2a9d23a0dc">pyzmq-23.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl</a><br>
32343235
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/3.10/pyzmq-23.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl#sha256=ce6741a46ce230c660417f28af9bbb505a6aa07ba5dca16b7e096afb2bad461e">pyzmq-23.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</a><br>
@@ -3960,6 +3961,7 @@
39603961
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/2311/tokenizers-0.15.0-pp38-pypy38_pp73-win_amd64.whl#sha256=0614f78fbb8a1859441128027a01ac110e3206bbdea61c8440888baf832bd321">tokenizers-0.15.0-pp38-pypy38_pp73-win_amd64.whl</a><br>
39613962
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/2311/tokenizers-0.15.0-pp39-pypy39_pp73-win_amd64.whl#sha256=800a645ea29efa63db2d76d1ccf7dad280cf1537887ed52bb1fc33751d5fa24a">tokenizers-0.15.0-pp39-pypy39_pp73-win_amd64.whl</a><br>
39623963
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/ext-cg/tomopy-1.10.3-pp38-pypy38_pp73-win_amd64.whl#sha256=b104cbc13a9e8f99bc9c88f903027e8945c005621b2fbd773dd0476cdb698bef">tomopy-1.10.3-pp38-pypy38_pp73-win_amd64.whl</a><br>
3964+
<a href="https://github.com/KumaTea/pytorch-riscv64/releases/download/2.4/torch-2.4.1-cp312-cp312-manylinux_2_35_riscv64.whl#sha256=2b4a0ecc1faeb1fb0675e7fc9106ed2ad8eb275629618db39af3a7b6d20461b9">torch-2.4.1-cp312-cp312-manylinux_2_35_riscv64.whl</a><br>
39633965
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/231202/torchtext-0.2.3-py3-none-any.whl#sha256=66886608bcaa6e2627994597db1f17983c9f85937289876e40c72a60dbbd3938">torchtext-0.2.3-py3-none-any.whl</a><br>
39643966
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/none/tornado-5.1.1-py3-none-any.whl#sha256=8a4331f50929bc34d16cc2e1538bc1bef11deaa3aaa29e576087d008a59241f0">tornado-5.1.1-py3-none-any.whl</a><br>
39653967
<a href="https://github.com/KumaTea/pypy-wheels/releases/download/231201/tornado-6.1-py3-none-any.whl#sha256=04854dde75cf9ceea5d72402a88a57c3aacf738e3f20e73e283ee7433582254c">tornado-6.1-py3-none-any.whl</a><br>

0 commit comments

Comments
 (0)