Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
a1ec1e0a
Commit
a1ec1e0a
authored
3 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
[bootstrap] use urllib to download miniconda.sh
parent
07c01f81
No related branches found
No related tags found
No related merge requests found
Pipeline
#54530
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/devtools/bootstrap.py
+5
-21
5 additions, 21 deletions
bob/devtools/bootstrap.py
with
5 additions
and
21 deletions
bob/devtools/bootstrap.py
+
5
−
21
View file @
a1ec1e0a
...
...
@@ -214,7 +214,7 @@ def ensure_miniconda_sh():
# WARNING: if you update this version, remember to update hashes below
# AND our "mirror" in the internal webserver
path
=
"
/conda-forge/miniforge/releases/download/4.10.3-6/Miniforge3-4.10.3-6-%s-x86_64.sh
"
path
=
"
https://github.com
/conda-forge/miniforge/releases/download/4.10.3-6/Miniforge3-4.10.3-6-%s-x86_64.sh
"
if
platform
.
system
()
==
"
Darwin
"
:
sha256
=
(
"
eabb50e2594d55eeb2a74fa05a919be876ec364e8064e1623ab096f39d6b6dd1
"
...
...
@@ -244,29 +244,13 @@ def ensure_miniconda_sh():
os
.
unlink
(
"
miniconda.sh
"
)
# re-downloads installer
import
http.client
server
=
(
"
github.com
"
,)
# https
logger
.
info
(
"
Connecting to https://%s...
"
,
*
server
)
conn
=
http
.
client
.
HTTPSConnection
(
server
[
0
])
conn
.
request
(
"
GET
"
,
path
)
r1
=
conn
.
getresponse
()
assert
r1
.
status
in
(
200
,
302
,
),
"
Request for http://%s%s - returned status %d
"
"
(%s)
"
%
(
server
[
0
],
path
,
r1
.
status
,
r1
.
reason
,
)
import
urllib.request
dst
=
"
miniconda.sh
"
logger
.
info
(
"
(download) http://%s%s -> %s...
"
,
server
[
0
],
path
,
dst
)
logger
.
info
(
"
(download) %s -> %s...
"
,
path
,
dst
)
response
=
urllib
.
request
.
urlopen
(
path
)
with
open
(
dst
,
"
wb
"
)
as
f
:
f
.
write
(
r
1
.
read
())
f
.
write
(
r
esponse
.
read
())
def
install_miniconda
(
prefix
,
name
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment