File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
graalpython/lib-graalpython/modules Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,16 @@ def system(cmd, msg=""):
56
56
def install_from_url (url , patch = None ):
57
57
name = url [url .rfind ("/" )+ 1 :]
58
58
tempdir = tempfile .mkdtemp ()
59
- system ("curl -o %s/%s %s" % (tempdir , name , url ))
59
+
60
+ # honor env var 'HTTP_PROXY' and 'HTTPS_PROXY'
61
+ env = os .environ
62
+ curl_opts = []
63
+ if url .startswith ("http://" ) and "HTTP_PROXY" in env :
64
+ curl_opts += ["--proxy" , env ["HTTP_PROXY" ]]
65
+ elif url .startswith ("https://" ) and "HTTPS_PROXY" in env :
66
+ curl_opts += ["--proxy" , env ["HTTPS_PROXY" ]]
67
+
68
+ system ("curl %s -o %s/%s %s" % (" " .join (curl_opts ), tempdir , name , url ))
60
69
if name .endswith (".tar.gz" ):
61
70
system ("tar xzf %s/%s -C %s" % (tempdir , name , tempdir ))
62
71
bare_name = name [:- len (".tar.gz" )]
@@ -395,8 +404,7 @@ def pandas():
395
404
396
405
dinfo->abstime = (double)(hour * 3600 + minute * 60) + second;
397
406
398
-
399
- """
407
+ """
400
408
install_from_url ("https://files.pythonhosted.org/packages/ee/aa/90c06f249cf4408fa75135ad0df7d64c09cf74c9870733862491ed5f3a50/pandas-0.20.3.tar.gz" , patch = patch )
401
409
402
410
return locals ()
You can’t perform that action at this time.
0 commit comments