Yelp/zygote — pull request #62 by selassid (2013-12-31 00:03:18+00:00)
Title: Pegs version in setup.py then imports that in the module __init__ code.

If I try to install zygote from PyPI using version 0.5.2, it doesn't work because setup.py is defining the package using itself; this will only work if there's another version lying around. I get the following in a fresh virtualenv:
```
$ pip install zygote -v
Downloading/unpacking zygote
Using version 0.5.2 (newest of versions: 0.5.2, 0.5, 0.4, 0.3)
Downloading zygote-0.5.2.tar.gz
Downloading from URL https://pypi.python.org/packages/source/z/zygote/zygote-0.5.2.tar.gz#md5=a976a42f3e843a6a0553e617005d4ac8 (from https://pypi.python.org/simple/zygote/)
Running setup.py egg_info for package zygote
Traceback (most recent call last):
File "", line 16, in
File "/nail/home/dselassi/zygote/TEST/build/zygote/setup.py", line 4, in
from zygote import version
ImportError: No module named zygote
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 16, in

File "/nail/home/dselassi/zygote/TEST/build/zygote/setup.py", line 4, in

from zygote import version

ImportError: No module named zygote

----------------------------------------
```

I followed the advice of http://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package . If I tell `pip` to look at a local sdist I just made of this new version 0.5.3, it works:
```
~/zygote(version-in-setup)$ pip install zygote -f ./dist/ -v
Downloading/unpacking zygote
Local files found: /nail/home/dselassi/zygote/dist/zygote-0.5.3.tar.gz
Using version 0.5.3 (newest of versions: 0.5.3, 0.5.2, 0.5, 0.4, 0.3)
Running setup.py egg_info for package zygote
running egg_info
creating pip-egg-info/zygote.egg-info
writing requirements to pip-egg-info/zygote.egg-info/requires.txt
writing pip-egg-info/zygote.egg-info/PKG-INFO
writing top-level names to pip-egg-info/zygote.egg-info/top_level.txt
writing dependency_links to pip-egg-info/zygote.egg-info/dependency_links.txt
writing entry points to pip-egg-info/zygote.egg-info/entry_points.txt
writing manifest file 'pip-egg-info/zygote.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/zygote.egg-info/SOURCES.txt'
writing manifest file 'pip-egg-info/zygote.egg-info/SOURCES.txt'
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./TEST/lib/python2.6/site-packages (from zygote)
Downloading/unpacking tornado (from zygote)
...
```