Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
6e757a7f
Commit
6e757a7f
authored
Aug 10, 2013
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented download using wget
parent
87a0b219
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
ez_setup.py
ez_setup.py
+17
-3
No files found.
ez_setup.py
View file @
6e757a7f
...
...
@@ -160,11 +160,11 @@ download_file_powershell.viable = (
)
def
download_file_curl
(
url
,
target
):
cmd
=
[
'curl
%(url)r -o %(target)s'
]
cmd
=
[
'curl
'
,
url
,
'-o'
,
target
]
subprocess
.
check_call
(
cmd
)
def
has_curl
():
cmd
=
[
'curl
--version'
]
cmd
=
[
'curl
'
,
'
--version'
]
try
:
subprocess
.
check_call
(
cmd
)
except
:
...
...
@@ -173,6 +173,20 @@ def has_curl():
download_file_curl
.
viable
=
has_curl
def
download_file_wget
(
url
,
target
):
cmd
=
[
'wget'
,
url
,
'-q'
,
'-O'
,
target
]
subprocess
.
check_call
(
cmd
)
def
has_wget
():
cmd
=
[
'wget'
,
'--version'
]
try
:
subprocess
.
check_call
(
cmd
)
except
:
return
False
return
True
download_file_curl
.
viable
=
has_wget
def
download_file_insecure
(
url
,
target
):
"""
Use Python to download the file, even though it cannot authenticate the
...
...
@@ -202,7 +216,7 @@ def get_best_downloader():
downloaders
=
[
download_file_powershell
,
download_file_curl
,
#
download_file_wget,
download_file_wget
,
download_file_insecure
,
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment