Mercurial > touhou
comparison setup.py @ 576:f3778145d7e7
Allow setup.py to be called without arguments.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 12 Aug 2014 15:07:54 +0200 |
parents | 7f113f15300b |
children | 8a8c2e519637 |
comparison
equal
deleted
inserted
replaced
575:e4c9eafab6d0 | 576:f3778145d7e7 |
---|---|
27 anmviewer = False # It’s currently broken anyway. | 27 anmviewer = False # It’s currently broken anyway. |
28 nthreads = 4 # How many processes to use for Cython compilation. | 28 nthreads = 4 # How many processes to use for Cython compilation. |
29 | 29 |
30 | 30 |
31 # Hack to prevent `setup.py clean` from compiling Cython files. | 31 # Hack to prevent `setup.py clean` from compiling Cython files. |
32 if sys.argv[1] == 'clean': | 32 if len(sys.argv) > 1 and sys.argv[1] == 'clean': |
33 import shutil | 33 import shutil |
34 shutil.rmtree('build', ignore_errors=True) | 34 shutil.rmtree('build', ignore_errors=True) |
35 for directory, _, files in os.walk('pytouhou'): | 35 for directory, _, files in os.walk('pytouhou'): |
36 for filename in files: | 36 for filename in files: |
37 if filename.endswith('.c'): | 37 if filename.endswith('.c'): |