Skip to content

Commit 2e72921

Browse files
sutaakaropenshift-merge-bot[bot]
authored andcommitted
Add support for providing PyPI connection properties
1 parent 4d01c30 commit 2e72921

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

support/environment.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ const (
4747

4848
// URL for downloading MNIST dataset
4949
mnistDatasetURL = "MNIST_DATASET_URL"
50+
51+
// URL for PiPI index containing all the required test Python packages
52+
pipIndexURL = "PIP_INDEX_URL"
53+
pipTrustedHost = "PIP_TRUSTED_HOST"
5054
)
5155

5256
type ClusterType string
@@ -117,6 +121,14 @@ func GetMnistDatasetURL() string {
117121
return lookupEnvOrDefault(mnistDatasetURL, "http://yann.lecun.com/exdb/mnist/")
118122
}
119123

124+
func GetPipIndexURL() string {
125+
return lookupEnvOrDefault(pipIndexURL, "https://pypi.python.org/simple")
126+
}
127+
128+
func GetPipTrustedHost() string {
129+
return lookupEnvOrDefault(pipTrustedHost, "")
130+
}
131+
120132
func lookupEnvOrDefault(key, value string) string {
121133
if v, ok := os.LookupEnv(key); ok {
122134
return v

0 commit comments

Comments
 (0)