Change upload_docs so that its use of base64 does not fail under Python 3.
Change upload_docs so that its use of base64 does not fail under
Python 3.

While base64 accepts a string in Python 2, the module in Python 3 only
works with bytes. Changed the code so that base64.encodebytes() is
used, else catch the AttributeError and use base64.encodestring(). Not
fully tested yet as there is another failure farther down under under
Python 3.

--HG--
branch : distribute
extra : rebase_source : 37078c416d98ee7f6dff1715731ab3f0c186b6cf

pypa/setuptools,pypa/setuptools,pypa/setuptools