An Azure service that provides an event-driven serverless compute platform.
Hello Melvin !
Thank you for posting on Microsoft Learn Q&A.
When you ZIP deploy a python function to a Linux plan and let the platform build your app , Kudu tries to pip install -r requirements.txt during deployment. If your function app is VNet integrated outbound to PyPI can be blocked then the build fails.
https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing
If your requirements.txt includes packages that don’t have compatible wheels for the functions image, Oryx needs to compile themand deployments fail.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python
I recommend that you build everything in the pipeline, ship a ready to run artifact, and keep runtime with the dependencies deterministic.
So pin python to the exact minor version your function app runs and build in that same version or container.
Then in CI, zip your code with .python_packages and deploy that ZIP
python -m pip install -r requirements.txt -t .python_packages/lib/site-packages
and on the app, set SCM_DO_BUILD_DURING_DEPLOYMENT=false