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
9c88e35e
Commit
9c88e35e
authored
Dec 31, 2020
by
Sviatoslav Sydorenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify `setuptools.installer.fetch_build_egg`
parent
818680c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
setuptools/installer.py
setuptools/installer.py
+8
-15
No files found.
setuptools/installer.py
View file @
9c88e35e
...
...
@@ -80,20 +80,17 @@ def fetch_build_egg(dist, req):
if
'allow_hosts'
in
opts
:
raise
DistutilsError
(
'the `allow-hosts` option is not supported '
'when using pip to install requirements.'
)
if
'PIP_QUIET'
in
os
.
environ
or
'PIP_VERBOSE'
in
os
.
environ
:
quiet
=
False
else
:
quiet
=
True
quiet
=
'PIP_QUIET'
not
in
os
.
environ
and
'PIP_VERBOSE'
not
in
os
.
environ
if
'PIP_INDEX_URL'
in
os
.
environ
:
index_url
=
None
elif
'index_url'
in
opts
:
index_url
=
opts
[
'index_url'
][
1
]
else
:
index_url
=
None
if
'find_links'
in
opts
:
find_links
=
_fixup_find_links
(
opts
[
'find_links'
][
1
])[:]
else
:
find_links
=
[]
find_links
=
(
_fixup_find_links
(
opts
[
'find_links'
][
1
])[:]
if
'find_links'
in
opts
else
[]
)
if
dist
.
dependency_links
:
find_links
.
extend
(
dist
.
dependency_links
)
eggs_dir
=
os
.
path
.
realpath
(
dist
.
get_egg_cache_dir
())
...
...
@@ -112,16 +109,12 @@ def fetch_build_egg(dist, req):
cmd
.
append
(
'--quiet'
)
if
index_url
is
not
None
:
cmd
.
extend
((
'--index-url'
,
index_url
))
if
find_links
is
not
None
:
for
link
in
find_links
:
cmd
.
extend
((
'--find-links'
,
link
))
for
link
in
find_links
or
[]:
cmd
.
extend
((
'--find-links'
,
link
))
# If requirement is a PEP 508 direct URL, directly pass
# the URL to pip, as `req @ url` does not work on the
# command line.
if
req
.
url
:
cmd
.
append
(
req
.
url
)
else
:
cmd
.
append
(
str
(
req
))
cmd
.
append
(
req
.
url
or
str
(
req
))
try
:
subprocess
.
check_call
(
cmd
)
except
subprocess
.
CalledProcessError
as
e
:
...
...
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