-
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
BUG: finish fix for speeding up "pip install ." #3219
Conversation
OK this isn't a complete fix. The TravisCI build fails on executing There's also an issue with
What's happening here apparently is that The original PR probably never worked..... |
Can anyone tell me what the best way is to run the relevant subset of tests here? I ran |
You can pass a filename to it like tox -e py34 tests/test_foo.py and it'll only run Those tests. You can also use pytest -k option to run s single test. Sent from my iPhone
|
Thanks @dstufft . I'll only run the |
This is a follow-up to pypagh-2535, which added the code to copy via (sdist + unpack) instead of shutil.copytree, but forgot to actually call that function. Fixes pypagh-2195 (slow pip install of a dir).
e8c4c31
to
749dc2a
Compare
I'll finish this up (if needed) after the discussion on what |
To clarify, this is what @dstufft has in mind currently (needs this PR): And this is what I'd prefer (doesn't need this PR): Discussion on mailing list: http://article.gmane.org/gmane.comp.python.distutils.devel/24687 |
FWIW, I agree with @dstufft. Your diagram doesn't include a way to get from directory to sdist - which while it may not be needed for the limited case of installing from a local directory, will be needed elsewhere (for example to release from a local directory). |
It depends. There's no |
Or is there a plan to add |
Well the build PEP hasn't been accepted yet :) There isn't a $ python setup.py sdist
$ pip install ./dist/foobar-1.0.tar.gz and $ pip install . Instead of being subtly different. In that vein, if we go this direction (and I'm not some dictator of course, so it's not set in stone) then we would likely end up adding a The flit author may not want to create a sdist, but I don't really think they are going to be able to do that in the larger ecosystem. Downstream redistributors are not going to accept wheels (even pure Python ones) as the source of their packages. |
Hmm, then that's a pretty fundamental difference. I'd like to just teach package authors to properly test their sdists in their CI (it's not that hard), and have
be the same as The internal complexity for pip is similar for both proposals, and the advantage of better testing for |
Right, and I'm sure the reason we're disagreeing on that trade-off is you're used to projects that take a significant amount of time to build and I'm used to random folks getting confused because of the subtle differences between installing from an sdist created from a directory and installing directly from a directory :) At the end of the day, the answer will probably come from whatever PEP ends up getting accepted for the build system abstraction and what capabilities that mandates a build system have. If it mandates that it has an sdist step and the process is directory -> sdist -> wheel -> install, then pip will follow that. If it mandates that sdists are really just a special form of a local directory and that you can go either from an existing local directory OR a sdist into a wheel, then pip will do that. If it's my preferred way, then that obviously kills the ability to let the build system do caching between multiple invocations of |
@dstufft agreed, makes sense to let this depend on the outcome of the build PEP. |
For the record, I think at this point the only reason numpy and scipy haven't already disabled |
After some recent packaging work I was reminded again that Unfortunately it looks like the build PEP didn't explicitly resolve this .... |
Can you clarify what that behavior is? |
Here's a few issues: numpy/numpy#7127 (comment). IIRC the inclusion of vcs history got fixed at some point, but not sure if that was for all vcs's or only for svn/git/hg. I haven't checked yet if Also, ignoring the way |
Accidentally closed this, reopening. Sorry! |
Hello! As part of an effort to ease the contribution process and adopt a more standard workflow pip has switched to doing development on the If you do nothing, this Pull Request will be automatically closed by @BrownTruck since it cannot be merged. If this pull request is still valid, please rebase it against If you choose to rebase/merge and resubmit this Pull Request, here is an example message that you can copy and paste:
|
This Pull Request was closed because it cannot be automatically reparented to the Please feel free to re-open it or re-submit it if it is still valid and you have rebased it onto |
This is a follow-up to gh-2535, which added the code to copy via
(sdist + unpack) instead of shutil.copytree, but forgot to actually
call that function.
Fixes gh-2195 (slow pip install of a dir).
I've tested that this works (on scipy), but since gh-2535 refers to some issues with
pbr
/ OpenStack and the previous PR didn't change pip's behavior thepbr
test should be redone.