'''
Created on Aug 23, 2012
@author: guoyun
'''
import sys
import os
import shutil
from setuptools import setup
def main():
if len(sys.argv) == 2 and sys.argv[1]=='clean':
#remove .pyc files
for (dirpath, dirnames, filenames) in os.walk('.'):
for filename in filenames:
filepath = os.path.join(dirpath, filename)
if filepath.endswith('.pyc'):
os.remove(filepath)
#remove dist dir
if os.path.exists('dist'):
shutil.rmtree('dist')
#remove dist dir
if os.path.exists('build'):
shutil.rmtree('build')
#remove *.egg-info
if os.path.exists('UNKNOWN.egg-info'):
shutil.rmtree('UNKNOWN.egg-info')
if __name__ == '__main__':
print 'arguments:',sys.argv
main()