build_samples.py 493 B

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