-
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
Fix build directory assertion for a PEP 517/518 world #6171
Conversation
When the ephemeral cache is used, the build can always occur. There is no need to check for those.
@@ -840,12 +840,6 @@ def build( | |||
newly built wheel, in preparation for installation. | |||
:return: True if all the wheels built correctly. |
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 :) )
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 comment
The 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 needs_ephem_cache
variable (or similarly defined variable) prior to the for loop above. And then check that ephem_cache
is true inside the for loop prior to appending to the buildset (depending on whether needs_ephem_cache
is true). That would give you more information if the condition ever fails, and let you raise an exception with more specific, contextual info (as well as fail faster).
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.
Yea, this worked and I decided "good is better than perfect" wrt code cleanup here. :)
- workaround for pypa/pip#6171
still seeing this issue in v19.0.1 in alpine:3.8 when pip installing using --no-cache-dir. adding --no-use-pep517 seems to be a workaround |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Closes #6158