-
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
Issue #2140: Build wheels during pip install #2618
Conversation
The topo sort thuings are from pull #2616 |
This sounds exciting |
2e35a5c
to
4c89e07
Compare
Can all the |
They're a single commit. Can pull it out if desired. |
758b819
to
82aba41
Compare
Its mainly tested via all the existing tests, but I added an explicit test looking at the output to be sure building was happening and handling of non-wheelable things. |
c2c03a1
to
affd2bf
Compare
I'm not sure why we're seeing those failures. Its not as simple as hashseed - I've tried using the same hashseed locally. It might be an isolation failure, or something. There's obviously an underlying issue, but until I can provoke it I can't fix it :( I'm going to try adding diagnostic changes on top of the stack to do that. |
c08a7f0
to
e93b9ed
Compare
try: | ||
os.makedirs(path) | ||
except OSError as e: | ||
if e.errno == errno.EEXIST: |
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.
or a shorter version:
if e.errno != errno.EEXIST:
raise
This now has a limit on it to not build or cache wheels for unversioned things. E.g. unless the url looks like an archive, we won't cache for it at all, which means that e.g. git+https://github.com/pypa/pip will not get cached wheels built. But a url like https://github.com/pypa/project-2 will. This isn't perfect, but it should be enough to avoid the vast majority of potential breakage. |
869a222
to
4a25059
Compare
ssl.SSLError: [Errno 8] _ssl.c:392: EOF occurred in violation of protocol
|
This is needed for determining the wheel-cachability of a requirement.
This won't put wheels into that directory, but will read them if they are there. --no-cache-dir will disable reading such wheels.
Building wheels before installing elminates a cause of broken environments - where install fails after we've already installed one or more packages. If a package fails to wheel, we run setup.py install as normally.
requirement_set, | ||
finder, | ||
build_options=[], | ||
global_options=[], |
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.
Wondering if this is not an issue (for build_options
and global_options
)... maybe the use of these would disable the wheel caching as I dont think we want to build wheels for all possible options ?
I'm going to go ahead and merge this. Some things may need to be adjusted still but I don't think that we're going to fully hammer them out with this sitting in a branch, and having it sit in a branch just makes it harder on @rbtcollins to have to keep updating it. I do think that the overall structure is sound and that the general feature is something we want. |
if not wheel.supported(): | ||
# Built for a different python/arch/etc | ||
continue | ||
candidates.append((wheel.support_index_min(), wheel_name)) |
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.
I was specifically looking for this sorting by the support index. yay, it's here.
Issue #2140: Build wheels during pip install
to be clear, I don't think we could release without the blacklist, so I assume that's coming. |
Added #2675 to track that. |
The
will end up building the wheel and installing from it without the passed option... |
So, that's actually already the case if you're installing from Wheels, they just get flat out ignored. We should probably figure something out to deal with them though. |
Is there a way to make pip create wheels and store them in the cache dir without actually installing them? I would like to fill my wheel cache from time to time too... |
This branch is building up to tackle issue #2140 - build wheels during install and then install those wheels.