Private Python packages and Azure functions remote build

Damian Birchler 1 Reputation point
2020-07-30T09:06:57.257+00:00

Hi there

We have an internal PyPI index to which we deploy private packages that we'd then like to pip install into our Python Azure function. Because our packaging index is not reachable from the Azure cloud we've so far opted for --build local. However, this has turned out to be a bit fragile as a couple of times now after adding new dependencies we get errors like these:

There was an error restoring dependencies. ERROR: cannot install pyrsistent-0.16.0 dependency: binary dependencies without wheels are not supported when building locally. Use the "--build remote" option to build dependencies on the Azure Functions build server, or "--build-native-deps" option to automatically build and configure the dependencies using a Docker container. More information at https://aka.ms/func-python-publish

I'd rather not get into the --build-native-deps option if I can avoid it as the CI runners we're using aren't under our control and I don't know how straight-forward it would be to have them configured for --build-native-deps.

Hence I was wondering whether it isn't possible to first pip install our couple private packages on our CI runner into a magic folder and have that folder uploaded to Azure to be considered in an otherwise standard remote build - or something along those lines.

Thanks,
Damian

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,015 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JayaC-MSFT 5,531 Reputation points
    2020-07-31T12:17:13.65+00:00

    @DamianBirchler-0892 Could you please try the standard remote build?
    Please refer to : https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python#remote-build

    Also, could you please confirm if you are using the latest version of core tools? Because the latest version of core tools will, by default, build on remote.
    You may check this : https://github.com/Azure/azure-functions-core-tools/issues/1092#issuecomment-552566915

    Please let me know if it helps.

    0 comments No comments

  2. Damian Birchler 1 Reputation point
    2020-08-03T07:54:50.207+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.