<#21682 python_google_cloud_function includes requ...
# github-notifications
c
#21682 python_google_cloud_function includes requirements themselves instead of requirements.txt Issue created by ahyatt-continua Describe the bug The way that Pants installs into a Google Cloud function is incorrect, and leads to versioning issues. Specifically, Pants does its normal thing of packaging up all of the dependencies into a package in the
dist
directory, which can then be uploaded to gcloud and used in the deploy. However, what should be done is only package first-party dependencies, and for everything else, create a
requirements.txt
and put it into the same directory as the one holding the function, and let GCF manage the dependencies (see their docs). Because this isn't done, other dependencies that are installed by default into the pip environment are used instead of Pants dependencies, so for the set of packages that GCF install automatically, the wrong version will be used. This results in bugs ranging in severity up to not being able to start the GCF function due to unexpected incompatibilities. Pants version Which version of Pants are you using? 2.21.0 OS Are you encountering the bug on MacOS, Linux, or both? Mac OS Additional info Add any other information about the problem here, such as attachments or links to gists, if relevant. pantsbuild/pants