-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build directory assertion for a PEP 517/518 world #6171
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix a crash when using --no-cache-dir with PEP 517 distributions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix a crash when using --no-cache-dir with PEP 517 distributions |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -840,12 +840,6 @@ def build( | |
newly built wheel, in preparation for installation. | ||
:return: True if all the wheels built correctly. | ||
""" | ||
# TODO: This check fails if --no-cache-dir is set. And yet we | ||
# might be able to build into the ephemeral cache, surely? | ||
building_is_possible = self._wheel_dir or ( | ||
autobuilding and self.wheel_cache.cache_dir | ||
) | ||
assert building_is_possible | ||
|
||
buildset = [] | ||
format_control = self.finder.format_control | ||
|
@@ -884,6 +878,13 @@ def build( | |
if not buildset: | ||
return [] | ||
|
||
# Is any wheel build not using the ephemeral cache? | ||
if any(not ephem_cache for _, ephem_cache in buildset): | ||
have_directory_for_build = self._wheel_dir or ( | ||
autobuilding and self.wheel_cache.cache_dir | ||
) | ||
assert have_directory_for_build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For future reference, it looks like an alternative way to do this would be to calculate a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, this worked and I decided "good is better than perfect" wrt code cleanup here. :) |
||
|
||
# TODO by @pradyunsg | ||
# Should break up this method into 2 separate methods. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(unrelated to this PR but the docstring seems obsolete :) )