You can not select more than 25 topics 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
460 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}.tex")
  16. subprocess.run(cmd, cwd="build", check=True)
  17. if __name__ == "__main__":
  18. main()