Hi everyone,
I’ve been using the serverless framework for a while to deploy functions that use python packages. For that purpose, I have been using the serverless-python-requirements plugin. This all works great. However, I now want to deploy a function that uses a python package that is hosted at a private pip server.
Locally, I add this pip server to my pip.conf file like this:
[install]
extra-index-url = https://$USERNAME:$PASSWORD@$URL/simple/
This works great when I install a package on my own device. However, when I try to deploy my function with the private python package in the requirements.txt, I get the following error:
Error --------------------------------------------------
Could not find a version that satisfies the requirement
$PACKAGE_NAME (from -r .serverless/requirements.txt
(line 11)) (from versions: )
No matching distribution
found for $PACKAGE_NAME (from -r .serverless/requirements.txt
(line 11))
It thus appears to me that the python requirements plugin uses the regular pip server and not the private pip server that I configured and use when I run pip install $PACKAGE_NAME.
Does any of you have an idea on how I can configure serverless so that it uses the private pip server?
Thank you in advance,
Gerben