Force installation of all requirements as eggs.

Review Request #258 — Created April 19, 2014 and submitted

Otherwise twitter.commons will get installed as sources. And
for reasons I'm not clear on this will omit in
twitter and twitter/commons, meaning that IDEs can't "see"
those packages.

This change allows you to add


to your IDE project's external deps.
rm -rf build-support/pants_deps.venv


ls build-support/pants_deps.venv/lib/python2.7/site-packages/ | grep twitter
  1. This is a recent-ish change in pip (not sure if it was intentional, but it is what it is.)  This *should* be supported by the IDE -- the IDE should be exec'ing the nspkg .pth files in the site-packages just like does on interpreter startup -- and if not, maybe file a ticket against the IDE?  Because if the IDE doesn't support it, we'll be having more problems in the future as we migrate towards wheels which _definitely_ don't have the namespace-declaration __init__.pys.
    1. It's a bug on the part of the IntelliJ Python plugin (or so I assume). But I actually encountered this issue while investigating another issue, namely why it takes so long to run tests. That turns out to be because we deploy the twitter commons packages as source packages, so dumping them in the chroot takes ~200ms each instead of the ~2ms it takes to dump eggs, which adds up, over (up to 16 packages) X (dozens of chroots).
      So I guess what I really want is to deploy twitter commons packages as eggs (or ,in the future, wheels), same as every other 3rdparty dep Pants depends on. This, I'm assuming, would have the side effect of installing them as eggs/wheels instead of sources in the venv without having to specify the --egg flag?
      Then the intellij issue would be OK for now, and we'll deal with wheels when we come to it. Hopefully by then the intellij Pants plugin will be ready for prime time.
    2. I confirmed pycharm also doesn't handle namespace package .pth processing.  I have the latest - Community Edition 3.1.2 (I have not checked out PyDev for eclipse - don't have it installed currently).
      I also confirmed this gets IDEA/PyCharm working for now so I'd be happy with adding a comment that references this bug:
  1. LGTM with a comment + IDEA bug pointer
Review request changed

Status: Closed (submitted)