1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/usr/bin/env python
"""
Release Steps
-------------
* write 'setup.py' file
* create ~./pypirc file with pypi user:pass
* register package with: 'python setup.py register'
* Edit CHANGELOG.txt
* Increment '__version__' in main script and 'version' in setup.py
* Run `deploy.py` to create sdist, upload, and create tag
* Commit tag
* Update wiki
"""
import sys
import time
from subprocess import call as subcall
app = 'tilelite'
version = __import__(app).__version__
def call(cmd):
try:
response = subcall(cmd,shell=True)
print
time.sleep(1)
if response < 0:
sys.exit(response)
except OSError, E:
sys.exit(E)
def cleanup():
call('sudo rm -rf *.egg* *.pyc dist/ build/')
def tag():
call('hg tag -u springmeyer -m "tagging the %s release" %s ' % (version,version))
def upload():
call('python setup.py sdist upload')
def main():
cleanup()
tag()
upload()
cleanup()
if __name__ == '__main__':
main()
|