wepay/Python-SDK — pull request #14 by kevinjqiu (2014-04-21 19:42:52+00:00)
Title: Delay importing requests so we don't get `ImportError` when running setup

`setup.py` needs to access `wepay.VERSION`, and the `wepay` module imports
`wepay.api` which depends on `requests`, but at the time setup is
running, `requests` library has not been installed (will be installed as
part of `install_requires` specified in setup.py). This fix breaks the
circular import by delaying importing `requests` until a `WePay` object
is instantiated.

**Alternatively**, you can move `VERSION` in `setup.py`, without changing anything else at all. However, since `VERSION` has been in the API as `wepay.VERSION`, I opted for the non-API-breaking route for the fix.