-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Some more trivial refactorings in WheelBuilder #7476
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
Some more trivial refactorings in WheelBuilder #7476
Conversation
Towards splitting the build method in two for pip wheel and pip install cases.
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.
This seems fine but as you pointed out, the 3rd commit is odd and even if your change seems correct, I don't how shutil.copy(wheel_file, self._wheel_dir)
and shutil.copy(os.path.join(cache_dir, wheel_file), self._wheel_dir)
could be equivalent.
And since the tests pass in both case, there is likely a hole in the (test) racket 😛
I actually noticed it because there is no equivalent |
24c9dd5
to
7aa4b8f
Compare
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.
This looks good to me.
A few small things may have made it a little easier to review:
- For the extraction of
_collect_buildset
, it may have been clearer to set up a localneed_wheel
first that looks like you want, then do the extraction in a separate step. - For the "Remove useless os.path.join in WheelBuilder" commit, maybe draw attention to why it is useless (i.e. the return value of _build_one_inside_env is already joined with the output directory). The commit message is a good place to put justification.
Indeed, you're right ^^ Thanks for the pointer. But this is not always true currently as |
With current pip master:
So there are definitely missing tests :) |
@xavfernandez you beat me to the reproducer :) So it looks like I actually fixed a previously unknown bug? |
It looks like it :) And found a missing test with a non-absolute |
Hm. It might be I introduced it myself in #7285. i'll add a test for the non-absolute |
We might want to handle |
The join is done in _build_one_inside_env. The bug as undetected because the cache directory is absolute most of the time.
Remnant of a reverted feature.
7aa4b8f
to
5109709
Compare
I added the test for non-absolute cache directory, and reworded the commit message. |
Travis CI failed for some reason. Restarted the job. |
Towards disentangling the
pip wheel
andpip install
cases inWheelBuilder
.The individual commits should be easy to follow. Let me know if you prefer smaller PRs.
The third commit may require more reviewer attention, as it removes an
os.path.join
that is useless if I see correctly.