| 5 | 1. In `spkg-build`, build the wheel explicitly using `pip wheel` (or `setup.py bdist_wheel`); store the wheel in `SAGE_ROOT/repo`. |
| 6 | |
| 7 | 2. In `spkg-install`, install the wheel. |
| 8 | |
| 9 | We drop (for Python packages only) the problematic use of the DESTDIR staging mechanism (#29585). The pip lock (if it is at all still necessary after the major pip upgrades in the 9.2 series) will only need to be held during the wheel installation (step 2). |
| 10 | |
| 11 | Optionally, the wheels in `SAGE_ROOT/repo` will persist after the completed build. Then we can create a PEP 503 compliant Simple Repository index in `SAGE_ROOT/repo`. Then users can create virtual environments and install the wheels built by the Sage distribution into them, using standard tools such as `pipenv` `[[source]]` or `pip install --find-links` or `pip install --index-url`. |
| 12 | |
| 13 | ------- |
| 14 | |
| 15 | References: |
| 16 | |
| 17 | - https://github.com/pytorch/pytorch/issues/25639 "Implement pep 503 Simple Repository API for deployment" |
| 18 | |
| 19 | - https://pypi.org/project/piprepo/ - create PEP 503 package repo |
| 20 | |
| 21 | - https://stackoverflow.com/questions/45744937/how-do-install-packages-from-a-local-python-package-index |
| 22 | |
| 23 | - https://pipenv-fork.readthedocs.io/en/latest/advanced.html#specifying-package-indexes |
| 24 | |