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=""):
5656def install_from_url (url , patch = None ):
5757 name = url [url .rfind ("/" )+ 1 :]
5858 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 ))
6069 if name .endswith (".tar.gz" ):
6170 system ("tar xzf %s/%s -C %s" % (tempdir , name , tempdir ))
6271 bare_name = name [:- len (".tar.gz" )]
@@ -395,8 +404,7 @@ def pandas():
395404
396405 dinfo->abstime = (double)(hour * 3600 + minute * 60) + second;
397406
398-
399- """
407+ """
400408 install_from_url ("https://files.pythonhosted.org/packages/ee/aa/90c06f249cf4408fa75135ad0df7d64c09cf74c9870733862491ed5f3a50/pandas-0.20.3.tar.gz" , patch = patch )
401409
402410 return locals ()
You can’t perform that action at this time.
0 commit comments