Commit ceb1c81
committed
Fix ROCm index URLs dropping the parent-directory hop
Follow-up to #8436. AMD serves a per-package index at
whl-multi-arch/<package>/ but stores the wheels flat in whl-multi-arch/, so
every href is "../<wheel>.whl".
replace_relative_links_with_absolute() normalised those with
str.lstrip("./"), which strips leading "." and "/" *characters* rather than a
prefix, so "../x.whl" collapsed to "x.whl" and was joined onto the package
URL. The published indices therefore point at
whl-multi-arch/<package>/<wheel>.whl, which returns HTTP 403:
https://download.pytorch.org/whl/nightly/rocm7.14/rocm-sdk-device-gfx1010/
Resolve the href with urllib.parse.urljoin instead, which honours the parent
hop. Scoped to ROCm via is_amd_package(): NVIDIA and PyPI indices do not use
"../" hrefs and keep the existing code path.1 parent 0be39b5 commit ceb1c81
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
839 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
840 | 843 | | |
841 | 844 | | |
842 | 845 | | |
843 | 846 | | |
844 | 847 | | |
845 | 848 | | |
| 849 | + | |
846 | 850 | | |
847 | 851 | | |
848 | 852 | | |
| |||
864 | 868 | | |
865 | 869 | | |
866 | 870 | | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
867 | 875 | | |
868 | 876 | | |
869 | 877 | | |
| |||
902 | 910 | | |
903 | 911 | | |
904 | 912 | | |
905 | | - | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
906 | 916 | | |
907 | 917 | | |
908 | 918 | | |
| |||
0 commit comments