GoogleCloudPlatform / gcloud-maven-plugin

Cloud SDK Maven Plugin for Google App Engine (Managed VMs and non Managed VMs)
Apache License 2.0
29 stars 24 forks source link

Check if python uses sites module or virtual_env before disabling import of 'sites'. #27

Closed ifigotin closed 9 years ago

ifigotin commented 9 years ago

gcloud SDK checks for the existence of two variables: CLOUDSDK_PYTHON_SITEPACKAGES VIRTUAL_ENV

If none of these variable are defined, then the sdk adds "-S" to python interpreter so that the 'sites' module is disabled (which apparently speeds things up). Otherwise, "-S" is not used.

In the maven plugin, though, we were adding "-S" in any case. This pull request includes a change to check for the two environment variables.

ludoch commented 9 years ago

LGTM