build_samples.py 510 B

1234567891011121314151617181920
  1. import os
  2. import subprocess
  3. import sys
  4. SAMPLES_TO_BUILD = [
  5. 'asteroids',
  6. ]
  7. SAMPLES_DIR = os.path.join(os.path.dirname(__file__), '..', 'samples')
  8. def main():
  9. for sample in SAMPLES_TO_BUILD:
  10. sampledir = os.path.join(SAMPLES_DIR, sample)
  11. os.chdir(sampledir)
  12. # This will raise a CalledProcessError if the build fails, which will cause
  13. # this script to fail
  14. subprocess.check_call([sys.executable, 'setup.py', 'bdist_apps'])
  15. if __name__ == '__main__':
  16. main()