Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
2d09741a
Commit
2d09741a
authored
Sep 17, 2022
by
David Hotham
Committed by
Bjorn Neergaard
Sep 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer wheels over source distribution
parent
cc971013
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
src/poetry/repositories/http.py
+15
-9
No files found.
src/poetry/repositories/http.py
View file @
2d09741a
...
@@ -102,12 +102,18 @@ class HTTPRepository(CachedRepository, ABC):
...
@@ -102,12 +102,18 @@ class HTTPRepository(CachedRepository, ABC):
return
PackageInfo
.
from_sdist
(
filepath
)
return
PackageInfo
.
from_sdist
(
filepath
)
def
_get_info_from_urls
(
self
,
urls
:
dict
[
str
,
list
[
str
]])
->
PackageInfo
:
def
_get_info_from_urls
(
self
,
urls
:
dict
[
str
,
list
[
str
]])
->
PackageInfo
:
# Checking wheels first as they are more likely to hold
# Prefer to read data from wheels: this is faster and more reliable
# the necessary information
wheels
=
urls
.
get
(
"bdist_wheel"
)
if
"bdist_wheel"
in
urls
:
if
wheels
:
# Check for a universal wheel
# We ought just to be able to look at any of the available wheels to read
wheels
=
urls
[
"bdist_wheel"
]
# metadata, they all should give the same answer.
#
# In practice this hasn't always been true.
#
# Most of the code in here is to deal with cases such as isort 4.3.4 which
# published separate python3 and python2 wheels with quite different
# dependencies. We try to detect such cases and combine the data from the
# two wheels into what ought to have been published in the first place...
universal_wheel
=
None
universal_wheel
=
None
universal_python2_wheel
=
None
universal_python2_wheel
=
None
universal_python3_wheel
=
None
universal_python3_wheel
=
None
...
@@ -195,9 +201,9 @@ class HTTPRepository(CachedRepository, ABC):
...
@@ -195,9 +201,9 @@ class HTTPRepository(CachedRepository, ABC):
if
universal_python2_wheel
:
if
universal_python2_wheel
:
return
self
.
_get_info_from_wheel
(
universal_python2_wheel
)
return
self
.
_get_info_from_wheel
(
universal_python2_wheel
)
if
platform_specific_wheels
and
"sdist"
not
in
urls
:
if
platform_specific_wheels
:
# Pick the first wheel available and hope for the best
first_wheel
=
platform_specific_wheels
[
0
]
return
self
.
_get_info_from_wheel
(
platform_specific_wheels
[
0
]
)
return
self
.
_get_info_from_wheel
(
first_wheel
)
return
self
.
_get_info_from_sdist
(
urls
[
"sdist"
][
0
])
return
self
.
_get_info_from_sdist
(
urls
[
"sdist"
][
0
])
...
...
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