Google App Engine Flex 是否支持 Pipfile?

Does Google App Engine Flex support Pipfile?

对于 App Engine Standard,明确声明它们不支持 Pipfile,如果项目包含 Pipfile,将立即阻止您推送项目。在搜索文档时,我没有看到任何提及 App Engine Flex 是否支持 Pipfile 的内容。

App Engine Flexible(和 App Engine Standard)不支持 Pipfile/Pipfile.lock

https://cloud.google.com/appengine/docs/flexible/python/using-python-libraries 说:

Dependencies for python applications are declared in a standard requirements.txt file.

https://cloud.google.com/appengine/docs/standard/python3/runtime#dependencies说:

Dependency specification using the Pipfile/Pipfile.lock standard is currently not supported and your project must not have these files present.

我 运行 进行了一些测试,虽然在 GAE flexible 应用程序的部署目录中存在 Pipfile 文件不会产生任何错误,但文件本身会被完全忽略,沿着其中指定的依赖关系。

此外,当尝试在灵活环境中替换 requirements.txt file with the Pipfile, a sample Python 应用程序部署时出错,要求我在 [=10= 中指定的 gunicorn 依赖项] 相反。

因此,不幸的是,简短的回答是 不,这同样适用于灵活的环境,因此,使用 Pipfile/Pipfile.lock 目前不支持标准。

您可以只在 .gcloudignore 文件中包含 PipfilePipfile.lock,并在任何库更改后 运行 pip freeze > requirements.txt