Pip options ins snapcraft.yaml


Is there a way to pass extra options/arguments to pip command while installing requirements for a python part ? Let’s say I want to install the packages with --no-binary or --no-use-wheel options what would be the correct way to achieve this ?


Yes, set environment variables.

As an example, here’s a reduced version of what we use to avoid pip going out to the Internet

PIP_NO_INDEX=true PIP_FIND_LINKS=/path/to/deps snapcraft snap

Awesome, Thanks for the response.
Should these env variables be part of snapcraft.yaml file or should they be set before running the snapcraft command?