Commit 83b2d68
authored
Merge preview (cp315) numpy wheels from scientific-python nightly wheelhouse into index (#8367)
## Summary
numpy is a `PACKAGE_LINKS_ALLOW_LIST` package: its index on
download.pytorch.org (e.g.
https://download.pytorch.org/whl/nightly/numpy) is a mirror of PyPI's
simple index, generated by `update_dependencies.py`. PyPI does **not**
publish cp315 wheels, so pip on Python 3.15 falls back to building numpy
from source and fails during torch preview-Python (3.15 / 3.15t) builds
and smoke tests.
The [scientific-python nightly
wheelhouse](https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/numpy)
publishes cp315 / cp315t numpy wheels for **all platforms** (Linux,
macOS, Windows). This PR merges those wheel URLs into the numpy index so
pip can resolve a real wheel.
## How it works
In `update_dependencies.py`, `upload_package_using_simple_index()` now
calls `append_preview_numpy_wheels()` after fetching the PyPI index:
- `fetch_preview_numpy_anchors()` downloads
`https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/numpy/`
and extracts every wheel whose ABI tag is in `PREVIEW_PYTHON_TAGS`
(`cp315`), absolutizing each href against `https://pypi.anaconda.org`.
- Those links are merged into the mirrored index before `</body>`,
skipping any already present (PyPI links for every other version are
untouched).
- If the upstream index is unreachable or lists no preview wheels, the
index is left unchanged — a no-op.
Restricted to **numpy** on the **nightly** and **test** channels only
(`PREVIEW_WHEEL_INJECT_PACKAGES` / `PREVIEW_WHEEL_INJECT_PREFIXES`); no
other package or channel is affected. `manage_v2.py` copies this index
into the per-CUDA subdirectories as today, and the absolute URLs stay
valid there.
## Notes
- Supersedes the earlier approach of hosting self-built numpy wheels on
download.pytorch.org — the links now point directly at the upstream
nightly wheelhouse.
- `PREVIEW_PYTHON_TAGS` is the single knob to extend this to future
preview interpreters.
- Verified against the live upstream index: 22 preview anchors (11 cp315
+ 11 cp315t, all platforms), absolute URLs, dedup preserves existing
PyPI links.1 parent 5655be5 commit 83b2d68
1 file changed
Lines changed: 104 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
761 | 783 | | |
762 | 784 | | |
763 | 785 | | |
| |||
877 | 899 | | |
878 | 900 | | |
879 | 901 | | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
880 | 980 | | |
881 | 981 | | |
882 | 982 | | |
| |||
902 | 1002 | | |
903 | 1003 | | |
904 | 1004 | | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
905 | 1009 | | |
906 | 1010 | | |
907 | 1011 | | |
| |||
0 commit comments