sudo apt-get install python-pip
Add ~/.pypirc
[distutils]
index-servers=
pypi
test
[test]
repository = https://testpypi.python.org/pypi
username = richard
password = <your password goes here>
[pypi]
repository = http://pypi.python.org/pypi
username = richard
password = <your password goes here>
python setup.py upload -r https://testpypi.python.org/pypi