Moving pycurl import - it cannot be at top level, since setup.py imports it, and that occurs on install of the package, before setup.py can say this package depends on pycurl.