25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

25 lines
456 B

  1. import sys
  2. import os
  3. import subprocess
  4. def main():
  5. if len(sys.argv) < 2:
  6. sys.exit("Usage: build.py NUMBER")
  7. number = sys.argv[1]
  8. os.makedirs("build", exist_ok=True)
  9. cmd = []
  10. if sys.platform == "darwin":
  11. # From mactex
  12. cmd.append("texi2pdf")
  13. else:
  14. cmd.append("pdflatex")
  15. cmd.append(f"../python-{number}")
  16. subprocess.run(cmd, cwd="build", check=True)
  17. if __name__ == "__main__":
  18. main()