Tipped off by How to set environment variables for parts?, it seems that the correct solution (or at least one way to do this) is to use build-environment
. E.g. in this case
build-environment:
- PIP_EXTRA_INDEX_URL: https://...
under the respective part definition.