MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / requiresVirtualEnv

Function requiresVirtualEnv

pkg/python/python.go:449–452  ·  view source on GitHub ↗

requiresVirtualEnv returns true for runtimes that require a virtual environment to be created before pip install. We cannot use Python per-user site-packages (https://www.python.org/dev/peps/pep-0370/), because Python 3.7 and 3.8 on App Engine and Cloud Functions have a virtualenv set up that disabl

()

Source from the content-addressed store, hash-verified

447 }
448 return !t.After(time.Now())
449}
450
451// requiresVirtualEnv returns true for runtimes that require a virtual environment to be created before pip install.
452// We cannot use Python per-user site-packages (https://www.python.org/dev/peps/pep-0370/),
453// because Python 3.7 and 3.8 on App Engine and Cloud Functions have a virtualenv set up
454// that disables user site-packages. The base images include a virtual environment pointing to
455// a directory that is not writeable in the buildpacks world (/env). In order to keep

Callers 1

PIPInstallRequirementsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected